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();
     $db = $this->getResourceName();
     $conn = $dbm->acquire($db);
     $object = new \Aimeos\MW\Criteria\PgSQL($conn);
     $dbm->release($conn, $db);
     if ($default === true) {
         $object->setConditions(parent::createSearch($default)->getConditions());
     }
     return $object;
 }