cleaning up the eloquent model class.

This commit is contained in:
Taylor Otwell 2012-03-29 16:58:08 -05:00
parent 7c9228b40b
commit 144117c0a1
1 changed files with 3 additions and 1 deletions

View File

@ -662,10 +662,12 @@ public function __unset($key)
*/ */
public function __call($method, $parameters) public function __call($method, $parameters)
{ {
$meta = array('key', 'table', 'connection', 'sequence', 'per_page');
// If the method is actually the name of a static property on the model we'll // If the method is actually the name of a static property on the model we'll
// return the value of the static property. This makes it convenient for // return the value of the static property. This makes it convenient for
// relationships to access these values off of the instances. // relationships to access these values off of the instances.
if (in_array($method, array('key', 'table', 'connection', 'sequence', 'per_page'))) if (in_array($method, $meta))
{ {
return static::$$method; return static::$$method;
} }