Skip to content

Instantly share code, notes, and snippets.

@Oshuma
Created June 5, 2009 00:15
Show Gist options
  • Select an option

  • Save Oshuma/123960 to your computer and use it in GitHub Desktop.

Select an option

Save Oshuma/123960 to your computer and use it in GitHub Desktop.
<?php
// CakePHP does stupid shit often times.
// http://api.cakephp.org/view_source/object/#line-112
function dispatchMethod($method, $params = array()) {
if (empty($params)) return $this->{$method}();
// We only hit this if there are parameters passed ($params isn't empty).
return call_user_func_array(array(&$this, $method), $params);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment