ProgrammableCallback
class ProgrammableCallback implements ConfigProvider
Properties
protected callable | $callback | ||
protected string | $js | ||
protected array | $params | ||
protected array | $vars |
Methods
No description
Add a parameter by value
Add a parameter by name
Get this object's callback
Get this callback's JavaScript
Get this object's variables
Remove all the parameters
Set this callback's JavaScript
Set or overwrite one of this callback's variable
Set all of this callback's variables at once
Return an array-based representation of this object to be used for parsing
Try to load the JavaScript source for this callback
Normalize a callback's representation
Details
at line 41
__construct(callable $callback)
No description
at line 58
ProgrammableCallback
addParameterByValue(mixed $paramValue)
Add a parameter by value
at line 73
ProgrammableCallback
addParameterByName(string $paramName)
Add a parameter by name
The value will be dynamically generated by the caller
at line 90
callable
getCallback()
Get this object's callback
at line 100
string
getJS()
Get this callback's JavaScript
at line 110
array
getVars()
Get this object's variables
at line 120
ProgrammableCallback
resetParameters()
Remove all the parameters
at line 133
ProgrammableCallback
setJS(string $js)
Set this callback's JavaScript
at line 147
ProgrammableCallback
setVar(string $name, string $value)
Set or overwrite one of this callback's variable
at line 160
ProgrammableCallback
setVars(array $vars)
Set all of this callback's variables at once
at line 170
array|Dictionary|null
asConfig()
Return an array-based representation of this object to be used for parsing
NOTE: if this method was named getConfig() it could interfere with magic getters from the Configurable trait
at line 209
protected void
autoloadJS()
Try to load the JavaScript source for this callback
at line 232
protected callable
normalizeCallback(callable $callback)
Normalize a callback's representation