Example #1
0
 public static function __callStatic($name, $arguments)
 {
     $collection = new Collection($arguments[0]);
     switch ($name) {
         case '_columns':
             return $collection->columns($arguments[1]);
         case '_where':
             return $collection->where($arguments[1]);
         case '_join':
             return $collection->join($arguments[1]);
         case '_order':
             return $collection->order($arguments[1], $arguments[2]);
         case '_group':
             return $collection->group($arguments[1]);
         case '_limit':
             return $collection->limit($arguments[1]);
         case '_offset':
             return $collection->offset($arguments[1]);
         case '_all':
             return $collection->all();
         default:
             throw new \Bacon\Exceptions\MethodNotFound();
     }
 }