PHP 클래스 Symfony\Component\DependencyInjection\Definition

저자: Fabien Potencier ([email protected])
파일 보기 프로젝트 열기: symfony/symfony 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$arguments

공개 메소드들

메소드 설명
__construct ( string | null $class = null, array $arguments = [] )
addArgument ( mixed $argument ) : Definition Adds an argument to pass to the service constructor/factory method.
addAutowiringType ( string $type ) : Definition Adds a type that will default to this definition.
addMethodCall ( string $method, array $arguments = [] ) : Definition Adds a method to call after service initialization.
addTag ( string $name, array $attributes = [] ) : Definition Adds a tag for this definition.
clearTag ( string $name ) : Definition Clears all tags for a given name.
clearTags ( ) : Definition Clears the tags for this definition.
getArgument ( integer $index ) : mixed Gets an argument to pass to the service constructor/factory method.
getArguments ( ) : array Gets the arguments to pass to the service constructor/factory method.
getAutowiredMethods ( ) : string[] Gets autowired methods.
getAutowiringTypes ( ) : string[] Gets autowiring types that will default to this definition.
getClass ( ) : string | null Gets the service class.
getConfigurator ( ) : callable | null Gets the configurator to call after the service is fully initialized.
getDecoratedService ( ) : null | array Gets the service that decorates this service.
getDeprecationMessage ( string $id ) : string Message to use if this definition is deprecated.
getFactory ( ) : string | array Gets the factory.
getFile ( ) : string | null Gets the file to require before creating the service.
getMethodCalls ( ) : array Gets the methods to call after service initialization.
getProperties ( )
getTag ( string $name ) : array Gets a tag by name.
getTags ( ) : array Returns all tags.
hasAutowiringType ( string $type ) : boolean Will this definition default for the given type?
hasMethodCall ( string $method ) : boolean Check if the current definition has a given method to call after service initialization.
hasTag ( string $name ) : boolean Whether this definition has a tag with the given name.
isAbstract ( ) : boolean Whether this definition is abstract, that means it merely serves as a template for other definitions.
isAutowired ( ) : boolean Is the definition autowired?
isDeprecated ( ) : boolean Whether this definition is deprecated, that means it should not be called anymore.
isLazy ( ) : boolean Whether this service is lazy.
isPublic ( ) : boolean Whether this service is public facing.
isShared ( ) : boolean Whether this service is shared.
isSynthetic ( ) : boolean Whether this definition is synthetic, that is not constructed by the container, but dynamically injected.
removeAutowiringType ( string $type ) : Definition Removes a type.
removeMethodCall ( string $method ) : Definition Removes a method to call after service initialization.
replaceArgument ( integer $index, mixed $argument ) : Definition Sets a specific argument.
setAbstract ( boolean $boolean ) : Definition Whether this definition is abstract, that means it merely serves as a template for other definitions.
setArguments ( array $arguments ) : Definition Sets the arguments to pass to the service constructor/factory method.
setAutowired ( boolean $autowired ) : Definition Sets autowired.
setAutowiredMethods ( array $autowiredMethods ) : Definition Sets autowired methods.
setAutowiringTypes ( array $types ) : Definition Sets types that will default to this definition.
setClass ( string $class ) : Definition Sets the service class.
setConfigurator ( string | array $configurator ) : Definition Sets a configurator to call after the service is fully initialized.
setDecoratedService ( null | string $id, null | string $renamedId = null, integer $priority ) : Definition Sets the service that this service is decorating.
setDeprecated ( boolean $status = true, string $template = null ) : Definition Whether this definition is deprecated, that means it should not be called anymore.
setFactory ( string | array $factory ) : Definition Sets a factory.
setFile ( string $file ) : Definition Sets a file to require before creating the service.
setLazy ( boolean $lazy ) : Definition Sets the lazy flag of this service.
setMethodCalls ( array $calls = [] ) : Definition Sets the methods to call after service initialization.
setProperties ( array $properties )
setProperty ( $name, $value )
setPublic ( boolean $boolean ) : Definition Sets the visibility of this service.
setShared ( boolean $shared ) : Definition Sets if the service must be shared or not.
setSynthetic ( boolean $boolean ) : Definition Sets whether this definition is synthetic, that is not constructed by the container, but dynamically injected.
setTags ( array $tags ) : Definition Sets tags for this definition.

메소드 상세

__construct() 공개 메소드

public __construct ( string | null $class = null, array $arguments = [] )
$class string | null The service class
$arguments array An array of arguments to pass to the service constructor

addArgument() 공개 메소드

Adds an argument to pass to the service constructor/factory method.
public addArgument ( mixed $argument ) : Definition
$argument mixed An argument
리턴 Definition The current instance

addAutowiringType() 공개 메소드

Adds a type that will default to this definition.
public addAutowiringType ( string $type ) : Definition
$type string
리턴 Definition The current instance

addMethodCall() 공개 메소드

Adds a method to call after service initialization.
public addMethodCall ( string $method, array $arguments = [] ) : Definition
$method string The method name to call
$arguments array An array of arguments to pass to the method call
리턴 Definition The current instance

addTag() 공개 메소드

Adds a tag for this definition.
public addTag ( string $name, array $attributes = [] ) : Definition
$name string The tag name
$attributes array An array of attributes
리턴 Definition The current instance

clearTag() 공개 메소드

Clears all tags for a given name.
public clearTag ( string $name ) : Definition
$name string The tag name
리턴 Definition

clearTags() 공개 메소드

Clears the tags for this definition.
public clearTags ( ) : Definition
리턴 Definition The current instance

getArgument() 공개 메소드

Gets an argument to pass to the service constructor/factory method.
public getArgument ( integer $index ) : mixed
$index integer
리턴 mixed The argument value

getArguments() 공개 메소드

Gets the arguments to pass to the service constructor/factory method.
public getArguments ( ) : array
리턴 array The array of arguments

getAutowiredMethods() 공개 메소드

Gets autowired methods.
public getAutowiredMethods ( ) : string[]
리턴 string[]

getAutowiringTypes() 공개 메소드

Gets autowiring types that will default to this definition.
public getAutowiringTypes ( ) : string[]
리턴 string[]

getClass() 공개 메소드

Gets the service class.
public getClass ( ) : string | null
리턴 string | null The service class

getConfigurator() 공개 메소드

Gets the configurator to call after the service is fully initialized.
public getConfigurator ( ) : callable | null
리턴 callable | null The PHP callable to call

getDecoratedService() 공개 메소드

Gets the service that decorates this service.
public getDecoratedService ( ) : null | array
리턴 null | array An array composed of the decorated service id, the new id for it and the priority of decoration, null if no service is decorated

getDeprecationMessage() 공개 메소드

Message to use if this definition is deprecated.
public getDeprecationMessage ( string $id ) : string
$id string Service id relying on this definition
리턴 string

getFactory() 공개 메소드

Gets the factory.
public getFactory ( ) : string | array
리턴 string | array The PHP function or an array containing a class/Reference and a method to call

getFile() 공개 메소드

Gets the file to require before creating the service.
public getFile ( ) : string | null
리턴 string | null The full pathname to include

getMethodCalls() 공개 메소드

Gets the methods to call after service initialization.
public getMethodCalls ( ) : array
리턴 array An array of method calls

getProperties() 공개 메소드

public getProperties ( )

getTag() 공개 메소드

Gets a tag by name.
public getTag ( string $name ) : array
$name string The tag name
리턴 array An array of attributes

getTags() 공개 메소드

Returns all tags.
public getTags ( ) : array
리턴 array An array of tags

hasAutowiringType() 공개 메소드

Will this definition default for the given type?
public hasAutowiringType ( string $type ) : boolean
$type string
리턴 boolean

hasMethodCall() 공개 메소드

Check if the current definition has a given method to call after service initialization.
public hasMethodCall ( string $method ) : boolean
$method string The method name to search for
리턴 boolean

hasTag() 공개 메소드

Whether this definition has a tag with the given name.
public hasTag ( string $name ) : boolean
$name string
리턴 boolean

isAbstract() 공개 메소드

Whether this definition is abstract, that means it merely serves as a template for other definitions.
public isAbstract ( ) : boolean
리턴 boolean

isAutowired() 공개 메소드

Is the definition autowired?
public isAutowired ( ) : boolean
리턴 boolean

isDeprecated() 공개 메소드

Whether this definition is deprecated, that means it should not be called anymore.
public isDeprecated ( ) : boolean
리턴 boolean

isLazy() 공개 메소드

Whether this service is lazy.
public isLazy ( ) : boolean
리턴 boolean

isPublic() 공개 메소드

Whether this service is public facing.
public isPublic ( ) : boolean
리턴 boolean

isShared() 공개 메소드

Whether this service is shared.
public isShared ( ) : boolean
리턴 boolean

isSynthetic() 공개 메소드

Whether this definition is synthetic, that is not constructed by the container, but dynamically injected.
public isSynthetic ( ) : boolean
리턴 boolean

removeAutowiringType() 공개 메소드

Removes a type.
public removeAutowiringType ( string $type ) : Definition
$type string
리턴 Definition The current instance

removeMethodCall() 공개 메소드

Removes a method to call after service initialization.
public removeMethodCall ( string $method ) : Definition
$method string The method name to remove
리턴 Definition The current instance

replaceArgument() 공개 메소드

Sets a specific argument.
public replaceArgument ( integer $index, mixed $argument ) : Definition
$index integer
$argument mixed
리턴 Definition The current instance

setAbstract() 공개 메소드

Whether this definition is abstract, that means it merely serves as a template for other definitions.
public setAbstract ( boolean $boolean ) : Definition
$boolean boolean
리턴 Definition the current instance

setArguments() 공개 메소드

Sets the arguments to pass to the service constructor/factory method.
public setArguments ( array $arguments ) : Definition
$arguments array An array of arguments
리턴 Definition The current instance

setAutowired() 공개 메소드

Allowed values: - true: constructor autowiring, same as $this->setAutowiredMethods(array('__construct')) - false: no autowiring, same as $this->setAutowiredMethods(array())
public setAutowired ( boolean $autowired ) : Definition
$autowired boolean
리턴 Definition The current instance

setAutowiredMethods() 공개 메소드

Example of allowed value: - array('__construct', 'set*', 'initialize'): autowire whitelisted methods only
public setAutowiredMethods ( array $autowiredMethods ) : Definition
$autowiredMethods array
리턴 Definition The current instance

setAutowiringTypes() 공개 메소드

Sets types that will default to this definition.
public setAutowiringTypes ( array $types ) : Definition
$types array
리턴 Definition The current instance

setClass() 공개 메소드

Sets the service class.
public setClass ( string $class ) : Definition
$class string The service class
리턴 Definition The current instance

setConfigurator() 공개 메소드

Sets a configurator to call after the service is fully initialized.
public setConfigurator ( string | array $configurator ) : Definition
$configurator string | array A PHP callable
리턴 Definition The current instance

setDecoratedService() 공개 메소드

Sets the service that this service is decorating.
public setDecoratedService ( null | string $id, null | string $renamedId = null, integer $priority ) : Definition
$id null | string The decorated service id, use null to remove decoration
$renamedId null | string The new decorated service id
$priority integer The priority of decoration
리턴 Definition The current instance

setDeprecated() 공개 메소드

Whether this definition is deprecated, that means it should not be called anymore.
public setDeprecated ( boolean $status = true, string $template = null ) : Definition
$status boolean
$template string Template message to use if the definition is deprecated
리턴 Definition the current instance

setFactory() 공개 메소드

Sets a factory.
public setFactory ( string | array $factory ) : Definition
$factory string | array A PHP function or an array containing a class/Reference and a method to call
리턴 Definition The current instance

setFile() 공개 메소드

Sets a file to require before creating the service.
public setFile ( string $file ) : Definition
$file string A full pathname to include
리턴 Definition The current instance

setLazy() 공개 메소드

Sets the lazy flag of this service.
public setLazy ( boolean $lazy ) : Definition
$lazy boolean
리턴 Definition The current instance

setMethodCalls() 공개 메소드

Sets the methods to call after service initialization.
public setMethodCalls ( array $calls = [] ) : Definition
$calls array An array of method calls
리턴 Definition The current instance

setProperties() 공개 메소드

public setProperties ( array $properties )
$properties array

setProperty() 공개 메소드

public setProperty ( $name, $value )

setPublic() 공개 메소드

Sets the visibility of this service.
public setPublic ( boolean $boolean ) : Definition
$boolean boolean
리턴 Definition The current instance

setShared() 공개 메소드

Sets if the service must be shared or not.
public setShared ( boolean $shared ) : Definition
$shared boolean Whether the service must be shared or not
리턴 Definition The current instance

setSynthetic() 공개 메소드

Sets whether this definition is synthetic, that is not constructed by the container, but dynamically injected.
public setSynthetic ( boolean $boolean ) : Definition
$boolean boolean
리턴 Definition the current instance

setTags() 공개 메소드

Sets tags for this definition.
public setTags ( array $tags ) : Definition
$tags array
리턴 Definition the current instance

프로퍼티 상세

$arguments 보호되어 있는 프로퍼티

protected $arguments