Instantiator
in package
This is a trimmed down version of https://github.com/doctrine/instantiator, basically without the caching
Tags
Table of Contents
- instantiate() : mixed
- {@inheritDoc}
- attemptInstantiationViaUnSerialization() : void
- buildFactory() : Closure
- Builds a {@see \Closure} capable of instantiating the given $className without invoking its constructor.
- getReflectionClass() : ReflectionClass
- hasInternalAncestors() : bool
- Verifies whether the given class is to be considered internal
- isInstantiableViaReflection() : bool
Methods
instantiate()
{@inheritDoc}
public
instantiate(mixed $className) : mixed
Parameters
- $className : mixed
Return values
mixed —attemptInstantiationViaUnSerialization()
private
attemptInstantiationViaUnSerialization(ReflectionClass $reflectionClass, string $serializedString) : void
Parameters
- $reflectionClass : ReflectionClass
- $serializedString : string
Tags
Return values
void —buildFactory()
Builds a {@see \Closure} capable of instantiating the given $className without invoking its constructor.
private
buildFactory(string $className) : Closure
Parameters
- $className : string
Return values
Closure —getReflectionClass()
private
getReflectionClass(string $className) : ReflectionClass
Parameters
- $className : string
Tags
Return values
ReflectionClass —hasInternalAncestors()
Verifies whether the given class is to be considered internal
private
hasInternalAncestors(ReflectionClass $reflectionClass) : bool
Parameters
- $reflectionClass : ReflectionClass
Return values
bool —isInstantiableViaReflection()
private
isInstantiableViaReflection(ReflectionClass $reflectionClass) : bool
Parameters
- $reflectionClass : ReflectionClass