PHP Class Symfony\Component\DependencyInjection\DefinitionDecorator

Author: Johannes M. Schmitt ([email protected])
Inheritance: extends Definition
ファイルを表示 Open project: pmjones/php-framework-benchmarks Class Usage Examples

Public Methods

Method Description
__construct ( string $parent ) Constructor.
getArgument ( integer $index ) : mixed Gets an argument to pass to the service constructor/factory method.
getChanges ( ) : array Returns all changes tracked for the Definition object.
getParent ( ) : string Returns the Definition being decorated.
replaceArgument ( integer $index, mixed $value ) : DefinitionDecorator You should always use this method when overwriting existing arguments of the parent definition.
setClass ( $class ) {@inheritDoc}
setConfigurator ( $callable ) {@inheritDoc}
setFactoryClass ( $class ) {@inheritDoc}
setFactoryMethod ( $method ) {@inheritDoc}
setFactoryService ( $service ) {@inheritDoc}
setFile ( $file ) {@inheritDoc}
setPublic ( $boolean ) {@inheritDoc}

Method Details

__construct() public method

Constructor.
public __construct ( string $parent )
$parent string The id of Definition instance to decorate.

getArgument() public method

If replaceArgument() has been used to replace an argument, this method will return the replacement value.
public getArgument ( integer $index ) : mixed
$index integer
return mixed The argument value

getChanges() public method

Returns all changes tracked for the Definition object.
public getChanges ( ) : array
return array An array of changes for this Definition

getParent() public method

Returns the Definition being decorated.
public getParent ( ) : string
return string

replaceArgument() public method

If you directly call setArguments() keep in mind that you must follow certain conventions when you want to overwrite the arguments of the parent definition, otherwise your arguments will only be appended.
public replaceArgument ( integer $index, mixed $value ) : DefinitionDecorator
$index integer
$value mixed
return DefinitionDecorator the current instance

setClass() public method

{@inheritDoc}
public setClass ( $class )

setConfigurator() public method

{@inheritDoc}
public setConfigurator ( $callable )

setFactoryClass() public method

{@inheritDoc}
public setFactoryClass ( $class )

setFactoryMethod() public method

{@inheritDoc}
public setFactoryMethod ( $method )

setFactoryService() public method

{@inheritDoc}
public setFactoryService ( $service )

setFile() public method

{@inheritDoc}
public setFile ( $file )

setPublic() public method

{@inheritDoc}
public setPublic ( $boolean )