コード例 #1
0
ファイル: Abstract.php プロジェクト: arcavias/arcavias-core
 /**
  * Initializes the criteria object with conditions based on the given parameter.
  *
  * @param MW_Common_Criteria_Interface $criteria Criteria object
  * @param stdClass $params Object that may contain the properties "condition", "sort", "dir", "start" and "limit"
  */
 private function _initCriteriaConditions(MW_Common_Criteria_Interface $criteria, stdClass $params)
 {
     if (isset($params->condition) && is_object($params->condition)) {
         $existing = $criteria->getConditions();
         $criteria->setConditions($criteria->toConditions((array) $params->condition));
         $expr = array($criteria->getConditions(), $existing);
         $criteria->setConditions($criteria->combine('&&', $expr));
     }
 }