15 private $on_load_code_binder =
null;
23 $clone->on_load_code_binder = $binder;
31 return $this->on_load_code_binder;
40 $refl = new \ReflectionFunction($binder);
41 $args = array_map(
function($arg) {
return $arg->name; }, $refl->getParameters());
42 if (array(
"id") !== $args) {
43 throw new \InvalidArgumentException(
'Expected closure "$binder" to have exactly one argument "$id".');
An exception for terminatinating execution or to throw for unit testing.
checkBinder(\Closure $binder)
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.
withOnLoadCode(\Closure $binder)