PHP Класс Symfony\Component\DependencyInjection\InterfaceInjector

Автор: Bulat Shakirzyanov ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$calls
$class
$processedDefinitions

Открытые методы

Метод Описание
__construct ( string $class ) Contructs interface injector by specifying the target class name
addMethodCall ( string $method, array $arguments = [] ) : InterfaceInjector Adds a method to call to be injected on any service implementing the interface.
getClass ( ) : string Returns the interface name
getMethodCalls ( ) : array Gets the methods to call after service initialization.
hasMethodCall ( string $method ) : boolean Check if the current definition has a given method to call after service initialization.
merge ( InterfaceInjector $injector ) Merges another InterfaceInjector
processDefinition ( Definition $definition, $class = null ) : void Adds method calls if Definition is of required interface
removeMethodCall ( string $method ) : Definition Removes a method to call after service initialization.
supports ( string $object ) : boolean Inspects if current interface injector is to be used with a given class

Описание методов

__construct() публичный Метод

Contructs interface injector by specifying the target class name
public __construct ( string $class )
$class string

addMethodCall() публичный Метод

Adds a method to call to be injected on any service implementing the interface.
public addMethodCall ( string $method, array $arguments = [] ) : InterfaceInjector
$method string The method name to call
$arguments array An array of arguments to pass to the method call
Результат InterfaceInjector The current instance

getClass() публичный Метод

Returns the interface name
public getClass ( ) : string
Результат string

getMethodCalls() публичный Метод

Gets the methods to call after service initialization.
public getMethodCalls ( ) : array
Результат array An array of method calls

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

merge() публичный Метод

Merges another InterfaceInjector
public merge ( InterfaceInjector $injector )
$injector InterfaceInjector

processDefinition() публичный Метод

Adds method calls if Definition is of required interface
public processDefinition ( Definition $definition, $class = null ) : void
$definition Definition
Результат void

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

supports() публичный Метод

Inspects if current interface injector is to be used with a given class
public supports ( string $object ) : boolean
$object string
Результат boolean

Описание свойств

$calls защищенное свойство

protected $calls

$class защищенное свойство

protected $class

$processedDefinitions защищенное свойство

protected $processedDefinitions