getAlias() public method

This alias is also the mandatory prefix to use when using YAML.
public getAlias ( ) : string
return string The alias
コード例 #1
0
ファイル: ContainerBuilder.php プロジェクト: hykz/Depot
 /**
  * Registers an extension.
  *
  * @param ExtensionInterface $extension An extension instance
  *
  * @api
  */
 public function registerExtension(ExtensionInterface $extension)
 {
     $this->extensions[$extension->getAlias()] = $extension;
     if (false !== $extension->getNamespace()) {
         $this->extensionsByNs[$extension->getNamespace()] = $extension;
     }
 }
コード例 #2
0
 public function validateConfiguration(ExtensionInterface $extension, $configuration)
 {
     if (!$configuration) {
         throw new \LogicException(sprintf('The extension with alias "%s" does not have its getConfiguration() method setup', $extension->getAlias()));
     }
     if (!$configuration instanceof ConfigurationInterface) {
         throw new \LogicException(sprintf('Configuration class "%s" should implement ConfigurationInterface in order to be dumpable', get_class($configuration)));
     }
 }
コード例 #3
0
 public function getAlias()
 {
     return $this->delegate->getAlias();
 }
コード例 #4
0
 /**
  * Registers an extension.
  *
  * @param ExtensionInterface $extension An extension instance
  */
 public static function registerExtension(ExtensionInterface $extension)
 {
     static::$extensions[$extension->getAlias()] = static::$extensions[$extension->getNamespace()] = $extension;
 }
コード例 #5
0
 /**
  * Replace an extension
  * @param ExtensionInterface $extension
  */
 public static function replaceExtension(ExtensionInterface $extension)
 {
     self::$extensions[$extension->getAlias()] = $extension;
 }