예제 #1
0
 /**
  */
 function __construct($postgresql)
 {
     global $logger;
     $this->logger = $logger;
     $this->db = \Rss\Util\Db\PostgreSQL::getPDO($postgresql);
     $this->feedsselect = $this->db->prepare($this->feedsselect);
     $this->feedsupdate = $this->db->prepare($this->feedsupdate);
 }
예제 #2
0
 /**
  */
 function __construct($postgresql)
 {
     global $logger;
     $this->logger = $logger;
     // Connect to remote cache database
     $this->cacheremote = \Rss\Util\Db\PostgreSQL::getPDO($postgresql);
     $this->cacheremoteinsert = $this->cacheremote->prepare($this->cacheremoteinsert);
     $this->cachelocal = $this->cache_local_connect();
     $this->cache_local_copy();
 }
예제 #3
0
 /**
  */
 function __construct($postgresql)
 {
     global $logger;
     $this->logger = $logger;
     $this->db = \Rss\Util\Db\PostgreSQL::getPDO($postgresql);
     $this->xpath = $this->db->prepare($this->xpath);
     $this->insert = $this->db->prepare($this->insert);
     $this->update = $this->db->prepare($this->update);
     $this->xpfailed = $this->db->prepare($this->xpfailed);
     $this->db->exec($this->clean);
 }
예제 #4
0
 /**
  *
  * @param object $logger        	
  */
 function __construct($postgresql)
 {
     try {
         global $logger;
         $this->logger = $logger;
         $this->db = \Rss\Util\Db\PostgreSQL::getPDO($postgresql);
         $this->qryupsert = $this->db->prepare($this->qryupsert);
     } catch (\Exception $e) {
         $m = 'Error connecting to PostgreSQL ' . $e->getCode() . ' ' . $e->getMessage() . ' ' . $e->getFile();
         $this->logger->logError($m);
     }
 }