PHP 인터페이스 Symfony\Component\DependencyInjection\ContainerInterface

저자: Fabien Potencier ([email protected])
저자: Johannes M. Schmitt ([email protected])
파일 보기 프로젝트 열기: pmjones/php-framework-benchmarks 0 사용 예제들

공개 메소드들

메소드 설명
addScope ( Symfony\Component\DependencyInjection\ScopeInterface $scope ) : void Adds a scope to the container
enterScope ( string $name ) : void Enters the given scope
get ( string $id, integer $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE ) : object Gets a service.
getParameter ( string $name ) : mixed Gets a parameter.
has ( string $id ) : boolean Returns true if the given service is defined.
hasParameter ( string $name ) : boolean Checks if a parameter exists.
hasScope ( string $name ) : boolean Whether this container has the given scope
isScopeActive ( string $name ) : boolean Determines whether the given scope is currently active.
leaveScope ( string $name ) : void Leaves the current scope, and re-enters the parent scope
set ( string $id, object $service, string $scope = self::SCOPE_CONTAINER ) Sets a service.
setParameter ( string $name, mixed $value ) Sets a parameter.

메소드 상세

addScope() 공개 메소드

Adds a scope to the container
public addScope ( Symfony\Component\DependencyInjection\ScopeInterface $scope ) : void
$scope Symfony\Component\DependencyInjection\ScopeInterface
리턴 void

enterScope() 공개 메소드

Enters the given scope
public enterScope ( string $name ) : void
$name string
리턴 void

get() 공개 메소드

Gets a service.
또한 보기: Reference
public get ( string $id, integer $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE ) : object
$id string The service identifier
$invalidBehavior integer The behavior when the service does not exist
리턴 object The associated service

getParameter() 공개 메소드

Gets a parameter.
public getParameter ( string $name ) : mixed
$name string The parameter name
리턴 mixed The parameter value

has() 공개 메소드

Returns true if the given service is defined.
public has ( string $id ) : boolean
$id string The service identifier
리턴 boolean true if the service is defined, false otherwise

hasParameter() 공개 메소드

Checks if a parameter exists.
public hasParameter ( string $name ) : boolean
$name string The parameter name
리턴 boolean The presence of parameter in container

hasScope() 공개 메소드

Whether this container has the given scope
public hasScope ( string $name ) : boolean
$name string
리턴 boolean

isScopeActive() 공개 메소드

It does however not check if the scope actually exists.
public isScopeActive ( string $name ) : boolean
$name string
리턴 boolean

leaveScope() 공개 메소드

Leaves the current scope, and re-enters the parent scope
public leaveScope ( string $name ) : void
$name string
리턴 void

set() 공개 메소드

Sets a service.
public set ( string $id, object $service, string $scope = self::SCOPE_CONTAINER )
$id string The service identifier
$service object The service instance
$scope string The scope of the service

setParameter() 공개 메소드

Sets a parameter.
public setParameter ( string $name, mixed $value )
$name string The parameter name
$value mixed The parameter value