PHP Класс Cascade\Config\Loader\ClassLoader\Resolver\ExtraOptionsResolver

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

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

Свойство Тип Описание
$params array Associative array of parameters to resolve against
$reflected ReflectionClass Reflection class for which you want to resolve extra options

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

Метод Описание
__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

Защищенные методы

Метод Описание
configureOptions ( Symfony\Component\OptionsResolver\OptionsResolver $resolver, ClassLoader $classLoader = null ) Configure options for the provided OptionResolver to match extra params requirements

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

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

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() защищенный Метод

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() публичный статический Метод

Generate a unique hash based on the keys of the extra params
public static generateParamsHashKey ( $params ) : string
Результат string Unique MD5 hash

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

Get the parameters we want to resolve against
public getParams ( ) : array
Результат array $params Associative array of parameters

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

Returns the reflected object
public getReflected ( ) : ReflectionClass
Результат ReflectionClass

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

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
Результат array Array of resolved options

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

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

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

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

Associative array of parameters to resolve against
protected array $params
Результат array

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

Reflection class for which you want to resolve extra options
protected ReflectionClass $reflected
Результат ReflectionClass