PHP Class Nelmio\Alice\Generator\Resolver\Parameter\Chainable\RecursiveParameterResolver

Inheritance: implements Nelmio\Alice\Generator\Resolver\ChainableParameterResolverInterface, implements Nelmio\Alice\Generator\Resolver\ParameterResolverAwareInterface, use trait Nelmio\Alice\IsAServiceTrait
Mostra file Open project: nelmio/alice Class Usage Examples

Public Methods

Method Description
__construct ( Nelmio\Alice\Generator\Resolver\ChainableParameterResolverInterface $resolver, integer $limit = 5 )
canResolve ( Parameter $parameter ) : boolean
resolve ( Parameter $parameter, ParameterBag $unresolvedParameters, ParameterBag $resolvedParameters, ResolvingContext $context = null, ParameterBag $previousResult = null, integer $counter = 1 ) : ParameterBag Resolves a parameter two times and if a different result is obtained will resolve the parameter again until two successive resolution give the same result.
withResolver ( Nelmio\Alice\Generator\Resolver\ParameterResolverInterface $resolver )

Private Methods

Method Description
incrementCounter ( integer $counter, integer $limit, string $parameterKey ) : integer
mergeResults ( ParameterBag $previous, ParameterBag $new ) : ParameterBag

Method Details

__construct() public method

public __construct ( Nelmio\Alice\Generator\Resolver\ChainableParameterResolverInterface $resolver, integer $limit = 5 )
$resolver Nelmio\Alice\Generator\Resolver\ChainableParameterResolverInterface
$limit integer

canResolve() public method

public canResolve ( Parameter $parameter ) : boolean
$parameter Nelmio\Alice\Parameter
return boolean

resolve() public method

public resolve ( Parameter $parameter, ParameterBag $unresolvedParameters, ParameterBag $resolvedParameters, ResolvingContext $context = null, ParameterBag $previousResult = null, integer $counter = 1 ) : ParameterBag
$parameter Nelmio\Alice\Parameter
$unresolvedParameters Nelmio\Alice\ParameterBag
$resolvedParameters Nelmio\Alice\ParameterBag
$context Nelmio\Alice\Generator\Resolver\ResolvingContext
$previousResult Nelmio\Alice\ParameterBag
$counter integer
return Nelmio\Alice\ParameterBag

withResolver() public method

public withResolver ( Nelmio\Alice\Generator\Resolver\ParameterResolverInterface $resolver )
$resolver Nelmio\Alice\Generator\Resolver\ParameterResolverInterface