Documentation

ObjectCreationCompiler
in package

Compiles an object definition into native PHP code that, when executed, creates the object.

Tags
author

Matthieu Napoli matthieu@mnapoli.fr

Table of Contents

Properties

$compiler  : Compiler

Methods

__construct()  : mixed
compile()  : string
resolveParameters()  : array<string|int, mixed>
assertClassIsInstantiable()  : void
assertClassIsNotAnonymous()  : void
compileLazyDefinition()  : string
getFunctionName()  : string
getParameterDefaultValue()  : mixed
Returns the default value of a function parameter.

Properties

Methods

resolveParameters()

public resolveParameters(MethodInjection|null $definition, ReflectionMethod|null $method) : array<string|int, mixed>
Parameters
$definition : MethodInjection|null
$method : ReflectionMethod|null
Return values
array<string|int, mixed>

getFunctionName()

private getFunctionName(ReflectionMethod $method) : string
Parameters
$method : ReflectionMethod
Return values
string

getParameterDefaultValue()

Returns the default value of a function parameter.

private getParameterDefaultValue(ReflectionParameter $parameter, ReflectionMethod $function) : mixed
Parameters
$parameter : ReflectionParameter
$function : ReflectionMethod
Tags
throws
InvalidDefinition

Can't get default values from PHP internal classes and functions


        
On this page

Search results