Exemplo n.º 1
0
 /**
  * Creates a search object and optionally sets base criteria.
  *
  * @param boolean $default Add default criteria
  * @return \Aimeos\MW\Criteria\Iface Criteria object
  */
 public function createSearch($default = false)
 {
     $object = new \Aimeos\MW\Criteria\MySQL(new \Aimeos\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 \Aimeos\MW\Criteria\Iface Criteria object
  */
 public function createSearch($default = false)
 {
     $dbm = $this->getContext()->getDatabaseManager();
     $conn = $dbm->acquire();
     $object = new \Aimeos\MW\Criteria\MySQL($conn);
     $dbm->release($conn);
     if ($default === true) {
         $object->setConditions(parent::createSearch($default)->getConditions());
     }
     return $object;
 }