Binder extends Binder
Class Binder
Table of Contents
Constants
- ANY_PARAMETER_NAME = -1
- EVENT_ON_BUILD_AUTO_WIRED_CLASSES = 'onBuildAutoWiredClasses'
- STATUS_FOUND = true
- STATUS_NOT_FOUND = false
Methods
- __construct() : mixed
- Binder constructor.
- buildForFunction() : mixed
- buildForMethod() : mixed
- getArgs() : array<string|int, mixed>
- Returns list of method params which possible use in call_user_func_array().
- getMethodParams() : array<string|int, mixed>
- Returns list of method params.
- invoke() : mixed
- Invokes method with binded parameters.
- registerDefaultAutoWirings() : mixed
- registerParameter() : mixed
- registerParameterDependsOnName() : mixed
- setListSourceParameters() : mixed
- setMethodParams() : $this
- Sets list of method params.
Constants
ANY_PARAMETER_NAME
public
mixed
ANY_PARAMETER_NAME
= -1
EVENT_ON_BUILD_AUTO_WIRED_CLASSES
public
mixed
EVENT_ON_BUILD_AUTO_WIRED_CLASSES
= 'onBuildAutoWiredClasses'
STATUS_FOUND
public
mixed
STATUS_FOUND
= true
STATUS_NOT_FOUND
public
mixed
STATUS_NOT_FOUND
= false
Methods
__construct()
Binder constructor.
public
__construct(mixed $instance, string $method, array<string|int, mixed> $listSourceParameters) : mixed
Parameters
- $instance : mixed
-
Instance of the class that contains the method.
- $method : string
-
Name of the method.
- $listSourceParameters : array<string|int, mixed>
-
List of parameters source which we want to bind.
buildForFunction()
public
final static buildForFunction(mixed $callable, array<string|int, mixed> $listSourceParameters) : mixed
Parameters
- $callable : mixed
- $listSourceParameters : array<string|int, mixed>
buildForMethod()
public
final static buildForMethod(mixed $instance, mixed $method, array<string|int, mixed> $listSourceParameters) : mixed
Parameters
- $instance : mixed
- $method : mixed
- $listSourceParameters : array<string|int, mixed>
getArgs()
Returns list of method params which possible use in call_user_func_array().
public
final getArgs() : array<string|int, mixed>
Return values
array<string|int, mixed>getMethodParams()
Returns list of method params.
public
final getMethodParams() : array<string|int, mixed>
Return values
array<string|int, mixed>invoke()
Invokes method with binded parameters.
public
final invoke() : mixed
return @mixed
registerDefaultAutoWirings()
public
static registerDefaultAutoWirings() : mixed
registerParameter()
public
final static registerParameter(mixed $className, Closure $constructObjectByClassAndId) : mixed
Parameters
- $className : mixed
- $constructObjectByClassAndId : Closure
registerParameterDependsOnName()
public
final static registerParameterDependsOnName(mixed $className, Closure $constructObjectByClassAndId[, Closure $constructIdParameterName = null ]) : mixed
Parameters
- $className : mixed
- $constructObjectByClassAndId : Closure
- $constructIdParameterName : Closure = null
setListSourceParameters()
public
setListSourceParameters(array<string|int, mixed> $listSourceParameters) : mixed
Parameters
- $listSourceParameters : array<string|int, mixed>
setMethodParams()
Sets list of method params.
public
final setMethodParams(array<string|int, mixed> $params) : $this
Parameters
- $params : array<string|int, mixed>
-
List of parameters.