Property | Type | Description | |
---|---|---|---|
$constructorArgs | ReflectionParameter[] | Associative array of contructor args to resolve against | |
$reflected | ReflectionClass | Reflection class for which you want to resolve constructor options |
Method | Description | |
---|---|---|
__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 |
Method | Description | |
---|---|---|
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 | ||
return | array | Contructor args |
public getReflected ( ) : ReflectionClass | ||
return | ReflectionClass |
public hashToArgsArray ( array $hashOfOptions ) : array | ||
$hashOfOptions | array | Array of options |
return | array | Array of ordered args |
public initConstructorArgs ( ) |
protected ReflectionParameter[] $constructorArgs | ||
return | ReflectionParameter[] |