예제 #1
0
 /**
  * Create a criteria for a especific model
  *
  * @param string $alias
  * @return \Engine\Mvc\Model\Query\Builder
  */
 public function queryBuilder($alias = null)
 {
     $params = [];
     $builder = new Builder($params);
     $builder->setModel($this, $alias);
     if (static::$_conditions !== null) {
         $builder->where($this->normalizeConditions(static::$_conditions));
     }
     return $builder;
 }