Свойство | Тип | Описание | |
---|---|---|---|
$constructorArgs | ReflectionParameter[] | Associative array of contructor args to resolve against | |
$reflected | ReflectionClass | Reflection class for which you want to resolve constructor options |
Метод | Описание | |
---|---|---|
__construct ( ReflectionClass $reflected ) | Contructor | |
getConstructorArgs ( ) : array | Returns the contructor args as an associative array | |
getReflected ( ) : ReflectionClass | Returns the reflected object | |
hashToArgsArray ( array $hashOfOptions ) : array | Loops through constructor args and buid an ordered array of args using the option values passed in. We assume the passed in array has been resolved already. | |
initConstructorArgs ( ) | Fetches constructor args (array of ReflectionParameter) from the reflected class and set them as an associative array | |
resolve ( array $options ) : array | Resolve options against constructor args |
Метод | Описание | |
---|---|---|
configureOptions ( Symfony\Component\OptionsResolver\OptionsResolver $optionsResolver ) | Configure options for the provided OptionResolver to match contructor args requirements |
public __construct ( ReflectionClass $reflected ) | ||
$reflected | ReflectionClass | Reflection class for which you want to resolve constructor options |
protected configureOptions ( Symfony\Component\OptionsResolver\OptionsResolver $optionsResolver ) | ||
$optionsResolver | Symfony\Component\OptionsResolver\OptionsResolver | OptionResolver to configure |
public getConstructorArgs ( ) : array | ||
Результат | array | Contructor args |
public getReflected ( ) : ReflectionClass | ||
Результат | ReflectionClass |
public hashToArgsArray ( array $hashOfOptions ) : array | ||
$hashOfOptions | array | Array of options |
Результат | array | Array of ordered args |
public initConstructorArgs ( ) |
protected ReflectionParameter[] $constructorArgs | ||
Результат | ReflectionParameter[] |