class Alias in Service Container 7
Same name and namespace in other branches
- 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Alias.php \Symfony\Component\DependencyInjection\Alias
@api
Hierarchy
- class \Symfony\Component\DependencyInjection\Alias
Expanded class hierarchy of Alias
14 files declare their use of Alias
- AutoAliasServicePass.php in modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Compiler/ AutoAliasServicePass.php - BackendCompilerPass.php in lib/
Drupal/ Core/ DependencyInjection/ Compiler/ BackendCompilerPass.php - Contains \Drupal\Core\DependencyInjection\Compiler\BackendCompilerPass.
- ContainerBuilderTest.php in modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Tests/ ContainerBuilderTest.php - DecoratorServicePass.php in modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Compiler/ DecoratorServicePass.php - DecoratorServicePassTest.php in modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Tests/ Compiler/ DecoratorServicePassTest.php
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Alias.php, line 17
Namespace
Symfony\Component\DependencyInjectionView source
class Alias {
private $id;
private $public;
/**
* Constructor.
*
* @param string $id Alias identifier
* @param bool $public If this alias is public
*
* @api
*/
public function __construct($id, $public = true) {
$this->id = strtolower($id);
$this->public = $public;
}
/**
* Checks if this DI Alias should be public or not.
*
* @return bool
*
* @api
*/
public function isPublic() {
return $this->public;
}
/**
* Sets if this Alias is public.
*
* @param bool $boolean If this Alias should be public
*
* @api
*/
public function setPublic($boolean) {
$this->public = (bool) $boolean;
}
/**
* Returns the Id of this alias.
*
* @return string The alias id
*
* @api
*/
public function __toString() {
return $this->id;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Alias:: |
private | property | ||
Alias:: |
private | property | ||
Alias:: |
public | function | Checks if this DI Alias should be public or not. | |
Alias:: |
public | function | Sets if this Alias is public. | |
Alias:: |
public | function | Constructor. | |
Alias:: |
public | function | Returns the Id of this alias. |