public function withFullUrl($url)
{
$this->getDbCriteria()->mergeWith(array(
'condition'=>'full_url=:url',
'params'=>array(':url'=>$url)
));
return $this;
}
class Model extends ActiveRecord {
public static function find() {
return new MyQuery(get_called_class());
}
}
class MyQuery extends ActiveQuery {
public function withFullUrl($url) {
$this->andWhere(['full_url' => $url]);
return $this;
}
}