You are here

protected function ZfExtensionManagerSfContainer::canonicalizeName in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Component/Bridge/ZfExtensionManagerSfContainer.php \Drupal\Component\Bridge\ZfExtensionManagerSfContainer::canonicalizeName()

This method was based from Zend Framework (http://framework.zend.com/)

@link http://github.com/zendframework/zf2 for the canonical source repository @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) @license http://framework.zend.com/license/new-bsd New BSD License

Canonicalize the extension name to a service name.

Parameters

string $name: The extension name.

Return value

string The service name, without the prefix.

2 calls to ZfExtensionManagerSfContainer::canonicalizeName()
ZfExtensionManagerSfContainer::get in core/lib/Drupal/Component/Bridge/ZfExtensionManagerSfContainer.php
Retrieve the extension
ZfExtensionManagerSfContainer::has in core/lib/Drupal/Component/Bridge/ZfExtensionManagerSfContainer.php
Do we have the extension?

File

core/lib/Drupal/Component/Bridge/ZfExtensionManagerSfContainer.php, line 94
Contains \Drupal\Component\Bridge\ZfExtensionManagerSfContainer.

Class

ZfExtensionManagerSfContainer
Defines a bridge between the ZF2 service manager to Symfony container.

Namespace

Drupal\Component\Bridge

Code

protected function canonicalizeName($name) {
  if (isset($this->canonicalNames[$name])) {
    return $this->canonicalNames[$name];
  }

  // This is just for performance instead of using str_replace().
  return $this->canonicalNames[$name] = strtolower(strtr($name, $this->canonicalNamesReplacements));
}