ParameterRecipe
class ParameterRecipe
| internal |
Cached dependency parameter metadata.
Stores the result of analyzing one constructor, method, or function parameter. Recipes are reused for the worker lifetime, avoiding repeated reflection on every container build or method call.
Methods
__construct(string $name, string $declaringClassName, string|null $className, bool $hasType, bool $hasDefault, mixed $default, bool $refreshDefault, bool $isVariadic, bool $isOptional, bool $allowsNull, array $attributes, ReflectionAttribute|null $contextualAttribute, ReflectionParameter|null $reflectionParameter, string $reflectionString = '')
No description
static ParameterRecipe
fromParameter(ReflectionParameter $parameter, string $declaringClassName, bool $includeReflectionString = false)
Create a cached recipe from a reflected parameter.
mixed
getDefaultValue()
Get the parameter's default value.
getReflectionParameter()
Get the reflected parameter retained for dynamic resolution.
static bool
containsRefreshableObject(mixed $value)
Determine whether a default contains a non-enum object.
Details
at line 26
__construct(string $name, string $declaringClassName, string|null $className, bool $hasType, bool $hasDefault, mixed $default, bool $refreshDefault, bool $isVariadic, bool $isOptional, bool $allowsNull, array $attributes, ReflectionAttribute|null $contextualAttribute, ReflectionParameter|null $reflectionParameter, string $reflectionString = '')
No description
at line 47
static ParameterRecipe
fromParameter(ReflectionParameter $parameter, string $declaringClassName, bool $includeReflectionString = false)
Create a cached recipe from a reflected parameter.
at line 78
mixed
getDefaultValue()
Get the parameter's default value.
at line 88
ReflectionParameter
getReflectionParameter()
Get the reflected parameter retained for dynamic resolution.
at line 97
static protected bool
containsRefreshableObject(mixed $value)
Determine whether a default contains a non-enum object.