PHP 클래스 Nette\DI\ContainerBuilder

상속: extends Nette\Object
파일 보기 프로젝트 열기: nette/di 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$parameters array

공개 메소드들

메소드 설명
addAlias ( $alias, $service )
addDefinition ( $name, ServiceDefinition $definition = NULL ) : ServiceDefinition Adds new service definition.
addDependency ( $dep ) : self Adds item to the list of dependencies.
addExcludedClasses ( array $classes ) : self
autowireArguments ( $class, $method, array $arguments ) : array Creates a list of arguments using autowiring.
complete ( ) : void
completeStatement ( Statement $statement ) : Statement
expand ( $value ) : mixed Expands %placeholders% in strings.
findByTag ( $tag ) : array Gets the service objects of the specified tag.
findByType ( $class ) : ServiceDefinition[] Gets the service names and definitions of the specified type.
formatPhp ( $statement, $args )
formatStatement ( Statement $statement )
generateClasses ( $className = 'Container', $parentName = NULL )
getAliases ( ) : array Gets all service aliases.
getByType ( $class ) : string | null Resolves service name by type.
getClassList ( )
getClassName ( )
getDefinition ( $name ) : ServiceDefinition Gets the service definition.
getDefinitions ( ) : ServiceDefinition[] Gets all service definitions.
getDependencies ( ) : array Returns the list of dependencies.
getServiceName ( $arg ) : string Converts @service or @\Class -> service name and checks its existence.
hasDefinition ( $name ) : boolean Does the service definition or alias exist?
literal ( $phpCode ) : Nette\PhpGenerator\PhpLiteral
normalizeEntity ( $entity )
prepareClassList ( ) : array Generates $dependencies, $classes and normalizes class names.
removeAlias ( $alias ) : void Removes the specified alias.
removeDefinition ( $name ) : void Removes the specified service definition.
setClassName ( $name )

비공개 메소드들

메소드 설명
checkCase ( $class )
resolveEntityClass ( $entity, $recursive = [] ) : string | null
resolveImplement ( ServiceDefinition $def, $name )
resolveServiceClass ( $name, $recursive = [] ) : string | null

메소드 상세

addAlias() 공개 메소드

public addAlias ( $alias, $service )

addDefinition() 공개 메소드

Adds new service definition.
public addDefinition ( $name, ServiceDefinition $definition = NULL ) : ServiceDefinition
$definition ServiceDefinition
리턴 ServiceDefinition

addDependency() 공개 메소드

Adds item to the list of dependencies.
public addDependency ( $dep ) : self
리턴 self

addExcludedClasses() 공개 메소드

public addExcludedClasses ( array $classes ) : self
$classes array
리턴 self

autowireArguments() 공개 메소드

Creates a list of arguments using autowiring.
public autowireArguments ( $class, $method, array $arguments ) : array
$arguments array
리턴 array

complete() 공개 메소드

public complete ( ) : void
리턴 void

completeStatement() 공개 메소드

public completeStatement ( Statement $statement ) : Statement
$statement Statement
리턴 Statement

expand() 공개 메소드

Expands %placeholders% in strings.
사용 중단:
public expand ( $value ) : mixed
리턴 mixed

findByTag() 공개 메소드

Gets the service objects of the specified tag.
public findByTag ( $tag ) : array
리턴 array of [service name => tag attributes]

findByType() 공개 메소드

Gets the service names and definitions of the specified type.
public findByType ( $class ) : ServiceDefinition[]
리턴 ServiceDefinition[]

formatPhp() 공개 메소드

사용 중단:
public formatPhp ( $statement, $args )

formatStatement() 공개 메소드

사용 중단:
public formatStatement ( Statement $statement )
$statement Statement

generateClasses() 공개 메소드

사용 중단:
public generateClasses ( $className = 'Container', $parentName = NULL )

getAliases() 공개 메소드

Gets all service aliases.
public getAliases ( ) : array
리턴 array

getByType() 공개 메소드

Resolves service name by type.
public getByType ( $class ) : string | null
리턴 string | null service name or NULL

getClassList() 공개 메소드

public getClassList ( )

getClassName() 공개 메소드

사용 중단:
public getClassName ( )

getDefinition() 공개 메소드

Gets the service definition.
public getDefinition ( $name ) : ServiceDefinition
리턴 ServiceDefinition

getDefinitions() 공개 메소드

Gets all service definitions.
public getDefinitions ( ) : ServiceDefinition[]
리턴 ServiceDefinition[]

getDependencies() 공개 메소드

Returns the list of dependencies.
public getDependencies ( ) : array
리턴 array

getServiceName() 공개 메소드

Converts @service or @\Class -> service name and checks its existence.
public getServiceName ( $arg ) : string
리턴 string of FALSE, if argument is not service name

hasDefinition() 공개 메소드

Does the service definition or alias exist?
public hasDefinition ( $name ) : boolean
리턴 boolean

literal() 공개 정적인 메소드

public static literal ( $phpCode ) : Nette\PhpGenerator\PhpLiteral
리턴 Nette\PhpGenerator\PhpLiteral

normalizeEntity() 공개 메소드

public normalizeEntity ( $entity )

prepareClassList() 공개 메소드

Generates $dependencies, $classes and normalizes class names.
public prepareClassList ( ) : array
리턴 array

removeAlias() 공개 메소드

Removes the specified alias.
public removeAlias ( $alias ) : void
리턴 void

removeDefinition() 공개 메소드

Removes the specified service definition.
public removeDefinition ( $name ) : void
리턴 void

setClassName() 공개 메소드

사용 중단:
public setClassName ( $name )

프로퍼티 상세

$parameters 공개적으로 프로퍼티

public array $parameters
리턴 array