Exemplo n.º 1
0
 /**
  * Creates a search object and optionally sets base criteria.
  *
  * @param boolean $default Add default criteria
  * @return MW_Common_Criteria_Interface Criteria object
  */
 public function createSearch($default = false)
 {
     $object = new MW_Common_Criteria_MySQL(new MW_DB_Connection_None());
     if ($default === true) {
         $object->setConditions(parent::createSearch($default)->getConditions());
     }
     return $object;
 }
Exemplo n.º 2
0
 /**
  * Creates a search object and optionally sets base criteria.
  *
  * @param boolean $default Add default criteria
  * @return MW_Common_Criteria_Interface Criteria object
  */
 public function createSearch($default = false)
 {
     $dbm = $this->_getContext()->getDatabaseManager();
     $conn = $dbm->acquire();
     $object = new MW_Common_Criteria_MySQL($conn);
     $dbm->release($conn);
     if ($default === true) {
         $object->setConditions(parent::createSearch($default)->getConditions());
     }
     return $object;
 }