PHP 클래스 Newscoop\DependencyInjection\ContainerBuilder

Provides wrapper methods for symfony's Container.
상속: extends Symfony\Component\DependencyInjection\Container
파일 보기 프로젝트 열기: sourcefabric/newscoop 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( array $options = [] ) Construct object.
getAliases ( ) : array Gets all defined aliases.
getService ( string $id ) : object Gets a service.
getServiceIds ( ) : array Gets all service ids.
hasService ( string $id ) : boolean Returns true if the given service is defined.
register ( string $id, string $class = null ) Registers a service definition.
setAlias ( string $alias, mixed $id ) Sets an alias for an existing service.
setService ( string $id, object $service ) Sets a service.

메소드 상세

__construct() 공개 메소드

Construct object.
public __construct ( array $options = [] )
$options array The default options

getAliases() 공개 메소드

Wrapper for ContainerBuilder::getAliases method.
public getAliases ( ) : array
리턴 array An array of aliases

getService() 공개 메소드

Wrapper for ContainerBuilder::get method.
public getService ( string $id ) : object
$id string The service identifier
리턴 object The associated service

getServiceIds() 공개 메소드

Wrapper for ContainerBuilder::getServiceIds method.
public getServiceIds ( ) : array
리턴 array An array of all defined service ids

hasService() 공개 메소드

Wrapper for ContainerBuilder::has method.
public hasService ( string $id ) : boolean
$id string The service identifier
리턴 boolean True if the service is defined, false otherwise

register() 공개 메소드

Wrapper for ContainerBuilder::getAliases method. This methods allows for simple registration of service definition with a fluid interface.
public register ( string $id, string $class = null )
$id string The service identifier
$class string The service class

setAlias() 공개 메소드

Wrapper for ContainerBuilder::setAlias method.
public setAlias ( string $alias, mixed $id )
$alias string The alias to create
$id mixed The service to alias

setService() 공개 메소드

Wrapper for ContainerBuilder::set method.
public setService ( string $id, object $service )
$id string The service identifier
$service object The service instance