Example #1
0
 /**
  * Add scopes functionality
  * @see CComponent::__call()
  * @since v1.0
  */
 public function __call($name, $parameters)
 {
     $scopes = $this->scopes();
     if (isset($scopes[$name])) {
         $this->getDbCriteria()->mergeWith($scopes[$name]);
         return $this;
     }
     return parent::__call($name, $parameters);
 }