Skip to content

Instantly share code, notes, and snippets.

@masarugen
Created August 27, 2012 12:02
Show Gist options
  • Save masarugen/3487850 to your computer and use it in GitHub Desktop.
Save masarugen/3487850 to your computer and use it in GitHub Desktop.
/**
* Dynamically handle static method calls on the model.
*
* @param string $method
* @param array $parameters
* @return mixed
*/
public static function __callStatic($method, $parameters)
{
$model = get_called_class();
return call_user_func_array(array(new $model, $method), $parameters);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment