Пример #1
0
 /**
  * @return Query
  */
 public function getQuery()
 {
     $query = new Query($this->getPhql(), $this->getDI());
     if (!empty($this->_bindParams)) {
         $query->setBindParams($this->_bindParams);
     }
     if (!empty($this->_bindTypes)) {
         $query->setBindTypes($this->_bindTypes);
     }
     return $query;
 }
Пример #2
0
 /**
  * @param string $phql
  * @param array $placeholders
  * @return mixed
  */
 public function executeQuery($phql, $placeholders = null)
 {
     $query = new Query($phql, $this->getDI());
     return $query->execute($placeholders);
 }