function ZfExtensionManagerSfContainer::canonicalizeName

Same name in this branch
  1. 9 core/lib/Drupal/Component/Bridge/ZfExtensionManagerSfContainer.php \Drupal\Component\Bridge\ZfExtensionManagerSfContainer::canonicalizeName()
Same name in other branches
  1. 8.9.x core/lib/Drupal/Component/Bridge/ZfExtensionManagerSfContainer.php \Drupal\Component\Bridge\ZfExtensionManagerSfContainer::canonicalizeName()

Canonicalize the extension name to a service name.

This method is based on Laminas service manager.

@link https://github.com/laminas/laminas-servicemanager for the canonical source repository @copyright Copyright (c) 2019, Laminas Foundation. (https://getlaminas.org/) @license https://github.com/laminas/laminas-servicemanager/blob/master/LICENSE.md

Parameters

string $name: The extension name.

Return value

string The service name, without the prefix.

See also

https://github.com/laminas/laminas-servicemanager/blob/2.7.11/src/Serviā€¦

2 calls to ZfExtensionManagerSfContainer::canonicalizeName()
ZfExtensionManagerSfContainer::get in core/modules/aggregator/src/ZfExtensionManagerSfContainer.php
ZfExtensionManagerSfContainer::has in core/modules/aggregator/src/ZfExtensionManagerSfContainer.php

File

core/modules/aggregator/src/ZfExtensionManagerSfContainer.php, line 104

Class

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

Namespace

Drupal\aggregator

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));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.