CodeClass
class CodeClass
Methods
__construct(string $className)
No description
string
getClassName()
No description
string
getShortClassName()
No description
static string
extractClassName(string $fullClassName)
No description
getConstructor()
No description
getConstructorArgumentsTypes()
No description
object
newInstanceFromServices(iterable $services)
This method can be used for dependency injection to build a class, like a controller in a MVC model, from a services' container.
Details
at line 19
__construct(string $className)
No description
at line 24
static CodeClass
from(object $object)
No description
at line 32
string
getClassName()
No description
at line 39
string
getShortClassName()
No description
at line 45
static string
extractClassName(string $fullClassName)
No description
at line 74
ReflectionMethod
getConstructor()
No description
at line 89
Vector
getConstructorArgumentsTypes()
No description
at line 115
object
newInstanceFromServices(iterable $services)
This method can be used for dependency injection to build a class, like a controller in a MVC model, from a services' container.
Each argument of the constructor is substituted by an item from $services. To match properly services and constructor arguments, each arguments need to have a type, and those types should properly exist in $services, without duplicate.