PHP Class DI\Definition\Resolver\FactoryResolver

Since: 4.0
Author: Matthieu Napoli ([email protected])
Inheritance: implements DI\Definition\Resolver\DefinitionResolver
ファイルを表示 Open project: mnapoli/php-di

Public Methods

Method Description
__construct ( Interop\Container\ContainerInterface $container, DI\Definition\Resolver\DefinitionResolver $resolver ) The resolver needs a container. This container will be passed to the factory as a parameter so that the factory can access other entries of the container.
isResolvable ( DI\Definition\Definition $definition, array $parameters = [] )
resolve ( DI\Definition\Definition $definition, array $parameters = [] ) Resolve a factory definition to a value.

Private Methods

Method Description
resolveExtraParams ( array $params )

Method Details

__construct() public method

The resolver needs a container. This container will be passed to the factory as a parameter so that the factory can access other entries of the container.
public __construct ( Interop\Container\ContainerInterface $container, DI\Definition\Resolver\DefinitionResolver $resolver )
$container Interop\Container\ContainerInterface
$resolver DI\Definition\Resolver\DefinitionResolver

isResolvable() public method

public isResolvable ( DI\Definition\Definition $definition, array $parameters = [] )
$definition DI\Definition\Definition
$parameters array

resolve() public method

This will call the callable of the definition.
public resolve ( DI\Definition\Definition $definition, array $parameters = [] )
$definition DI\Definition\Definition {@inheritdoc}
$parameters array