Factory
final class Factory
Creates PhpGenerator representations from reflection objects or PHP source code.
Methods
fromClassReflection(ReflectionClass $from, bool $withBodies = false)
Creates a ClassLike instance from a reflection object.
Closure
fromFunctionReflection(ReflectionFunction $from, bool $withBody = false)
Creates a GlobalFunction or Closure instance from a reflection object.
Closure
fromCallable(callable $from)
No description
fromConstantReflection(ReflectionClassConstant $from)
No description
fromCaseReflection(ReflectionClassConstant $from)
No description
fromObject(object $obj)
No description
fromClassCode(string $code)
Parses PHP source code and returns the first class-like type found.
Details
at line 33
ClassLike
fromClassReflection(ReflectionClass $from, bool $withBodies = false)
Creates a ClassLike instance from a reflection object.
at line 194
Method
fromMethodReflection(ReflectionMethod $from)
No description
at line 217
Closure
fromFunctionReflection(ReflectionFunction $from, bool $withBody = false)
Creates a GlobalFunction or Closure instance from a reflection object.
at line 247
Closure
fromCallable(callable $from)
No description
at line 256
Parameter
fromParameterReflection(ReflectionParameter $from)
No description
at line 292
Constant
fromConstantReflection(ReflectionClassConstant $from)
No description
at line 304
EnumCase
fromCaseReflection(ReflectionClassConstant $from)
No description
at line 314
Property
fromPropertyReflection(ReflectionProperty $from)
No description
at line 375
Literal
fromObject(object $obj)
No description
at line 385
ClassLike
fromClassCode(string $code)
Parses PHP source code and returns the first class-like type found.
at line 395
PhpFile
fromCode(string $code)
Parses PHP source code and returns the resulting PhpFile representation.