Ejemplo n.º 1
0
 /**
  * @param FetcherInterface $fetcher
  * @param FetchConfig $fetchConfig
  *
  * @return array
  */
 public function fetchAll(FetcherInterface $fetcher, FetchConfig $fetchConfig)
 {
     $fetchStyle = $fetchConfig->getFetchStyle();
     if (!$this->hasRowsForFetchStyle($fetchStyle)) {
         $this->rows[$fetchStyle] = $fetcher->fetchAll($this->rows[CorePDO::FETCH_BOTH], $fetchConfig);
     }
     return $this->rows[$fetchStyle];
 }
Ejemplo n.º 2
0
 /**
  * @param FetchConfig $fetchConfig
  *
  * @return array
  * @throws Exception
  */
 public function fetchAll(FetchConfig $fetchConfig)
 {
     $fetcher = $this->fetcherFactory->getByFetchStyle($fetchConfig->getFetchStyle());
     if (!$this->isInitialized()) {
         $this->initialize();
     }
     return $this->data->fetchAll($fetcher, $fetchConfig);
 }