Exemple #1
0
 /**
  * @param \obo\Interfaces\IQuerySpecification $specification
  * @return self
  */
 public function addSpecification(\obo\Interfaces\IQuerySpecification $specification)
 {
     $where = $specification->getWhere();
     $this->where["query"] .= $where["query"];
     $this->where["data"] = \array_merge($this->where["data"], $where["data"]);
     $orderBy = $specification->getOrderBy();
     $this->orderBy["query"] .= $orderBy["query"];
     $this->orderBy["data"] = \array_merge($this->orderBy["data"], $orderBy["data"]);
     $offset = $specification->getOffset();
     $this->offset["query"] = $offset["query"];
     $this->offset["data"] = $offset["data"];
     $limit = $specification->getLimit();
     $this->limit["query"] = $limit["query"];
     $this->limit["data"] = $limit["data"];
     return $this;
 }
Exemple #2
0
 /**
  * @param \obo\Interfaces\IQuerySpecification $specification
  * @return void
  */
 public function addSpecification(\obo\Interfaces\IQuerySpecification $specification)
 {
     $this->specification->addSpecification($specification);
     $this->clear();
 }