PHP Class Cascade\Config\Loader\ClassLoader\Resolver\ExtraOptionsResolver

Author: Raphael Antonmattei ([email protected])
Afficher le fichier Open project: theorchard/monolog-cascade Class Usage Examples

Protected Properties

Свойство Type Description
$params array Associative array of parameters to resolve against
$reflected ReflectionClass Reflection class for which you want to resolve extra options

Méthodes publiques

Méthode Description
__construct ( ReflectionClass $reflected, array $params = [] ) Constructor
generateParamsHashKey ( $params ) : string Generate a unique hash based on the keys of the extra params
getParams ( ) : array Get the parameters we want to resolve against
getReflected ( ) : ReflectionClass Returns the reflected object
resolve ( array $options, ClassLoader $classLoader = null ) : array Resolve options against extra params requirements
setParams ( array $params = [] ) Set the parameters we want to resolve against

Méthodes protégées

Méthode Description
configureOptions ( Symfony\Component\OptionsResolver\OptionsResolver $resolver, ClassLoader $classLoader = null ) Configure options for the provided OptionResolver to match extra params requirements

Method Details

__construct() public méthode

Constructor
public __construct ( ReflectionClass $reflected, array $params = [] )
$reflected ReflectionClass Reflection class for which you want to resolve extra options
$params array Associative array of extra parameters we want to resolve against

configureOptions() protected méthode

Configure options for the provided OptionResolver to match extra params requirements
protected configureOptions ( Symfony\Component\OptionsResolver\OptionsResolver $resolver, ClassLoader $classLoader = null )
$resolver Symfony\Component\OptionsResolver\OptionsResolver
$classLoader Cascade\Config\Loader\ClassLoader Optional class loader if you want to use custom handlers for some of the extra options

generateParamsHashKey() public static méthode

Generate a unique hash based on the keys of the extra params
public static generateParamsHashKey ( $params ) : string
Résultat string Unique MD5 hash

getParams() public méthode

Get the parameters we want to resolve against
public getParams ( ) : array
Résultat array $params Associative array of parameters

getReflected() public méthode

Returns the reflected object
public getReflected ( ) : ReflectionClass
Résultat ReflectionClass

resolve() public méthode

Resolve options against extra params requirements
public resolve ( array $options, ClassLoader $classLoader = null ) : array
$options array Array of option values
$classLoader Cascade\Config\Loader\ClassLoader Optional class loader if you want to use custom handlers to resolve the extra options
Résultat array Array of resolved options

setParams() public méthode

Set the parameters we want to resolve against
public setParams ( array $params = [] )
$params array Associative array of extra parameters we want to resolve against

Property Details

$params protected_oe property

Associative array of parameters to resolve against
protected array $params
Résultat array

$reflected protected_oe property

Reflection class for which you want to resolve extra options
protected ReflectionClass $reflected
Résultat ReflectionClass