Esempio n. 1
0
 /**
  * Load the items
  *
  * @return bool
  */
 protected function loadItems()
 {
     try {
         //TODO use guzzle
         $xml = simplexml_load_file($this->buildUrl());
         $this->result = \CultureFeed_Cdb_List_Results::parseFromCdbXml($xml);
     } catch (\Exception $e) {
     }
     return (bool) $this->result->getTotalResultsfound();
 }
Esempio n. 2
0
 /**
  * @return bool
  * @throws ClientErrorResponseException
  * @throws \Exception
  */
 protected function loadItems()
 {
     $this->maxResults = $this->config->getParam('maxResults', $this->maxResults);
     $this->pageSize = $this->config->getParam('pageSize', $this->pageSize);
     if ($this->page >= $this->maxResults) {
         return false;
     }
     try {
         $this->result = $this->cnetAdapter->getEventList($this->page, $this->pageSize);
     } catch (\Exception $e) {
         throw $e;
     }
     $this->page += $this->result->getTotalResultsfound();
     $this->result->rewind();
     return (bool) $this->result->getTotalResultsfound();
 }