From b4db0f1b36b6d6c9c5346a51ec7d5a4090f85bb9 Mon Sep 17 00:00:00 2001 From: Jason Lewis Date: Sun, 3 Jun 2012 19:45:49 +0930 Subject: [PATCH] Small change moving array to a variable. Signed-off-by: Jason Lewis --- laravel/database/eloquent/model.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/laravel/database/eloquent/model.php b/laravel/database/eloquent/model.php index a6a32780..95e14ab5 100644 --- a/laravel/database/eloquent/model.php +++ b/laravel/database/eloquent/model.php @@ -744,10 +744,12 @@ public function __call($method, $parameters) return static::$$method; } + $underscored = array('with', 'find') + // 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 // 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); }