Skip to content

Instantly share code, notes, and snippets.

@Casperhr
Created June 19, 2015 06:22
Show Gist options
  • Select an option

  • Save Casperhr/cf26743da9834c4bd616 to your computer and use it in GitHub Desktop.

Select an option

Save Casperhr/cf26743da9834c4bd616 to your computer and use it in GitHub Desktop.
public function __call($method, $arg) {
if(substr($method, 0, strlen('enqueue')) === 'enqueue') {
$method = str_replace('enqueue', '', $method);
if(method_exists($this, $method)) {
\Queue::push(new NodesCommand([
'class' => get_class($this),
'function' => $method,
'params' => $arg
]));
}
return;
}
parent::__call($method, $arg);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment