Ejemplo n.º 1
0
 function getBannerPartners()
 {
     $result = $this->selectBannerStmt->execute();
     if (!$result) {
         throw new \Exception("Ошибка базы данных. Запрос на выборку партнеров не прошел");
     }
     $collection = parent::getCollection($this->selectBannerStmt);
     return $collection;
 }
Ejemplo n.º 2
0
 function getData($page, $type = null, $from = null, $to = null)
 {
     if (!preg_match("|^[\\d]+\$|", $page)) {
         $page = 0;
     }
     $selectionFactory = new SelectionFactory($this->pdo, $page, $type, $from, $to);
     $stmt = $selectionFactory->selectData();
     $result = $stmt->execute();
     if (!$result) {
         throw new \Exception("Ошибка базы данных. Запрос на выборку новостей не прошел");
     }
     $collection = parent::getCollection($stmt, true);
     return $collection;
 }