Created
August 27, 2012 12:02
-
-
Save masarugen/3487850 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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