Small change moving array to a variable.

Signed-off-by: Jason Lewis <jason.lewis1991@gmail.com>
This commit is contained in:
Jason Lewis 2012-06-03 19:45:49 +09:30
parent ab2fcb84ef
commit b4db0f1b36
1 changed files with 3 additions and 1 deletions

View File

@ -744,10 +744,12 @@ public function __call($method, $parameters)
return static::$$method; return static::$$method;
} }
$underscored = array('with', 'find')
// Some methods need to be accessed both staticly and non-staticly so we'll // Some methods need to be accessed both staticly and non-staticly so we'll
// keep underscored methods of those methods and intercept calls to them // keep underscored methods of those methods and intercept calls to them
// here so they can be called either way on the model instance. // here so they can be called either way on the model instance.
if (in_array($method, array('with', 'find'))) if (in_array($method, $underscored))
{ {
return call_user_func_array(array($this, '_'.$method), $parameters); return call_user_func_array(array($this, '_'.$method), $parameters);
} }