コード例 #1
0
 /**
  * @inheritdoc
  */
 public function isInitialized()
 {
     $dbAdapter = $this->getDbAdapter();
     $sql = sprintf("SHOW TABLES LIKE '%s'", Utils::getTrackingTableName());
     $results = $dbAdapter->query($sql, DbAdapter::QUERY_MODE_EXECUTE);
     if ($results->count() > 0) {
         return true;
     }
     return false;
 }
コード例 #2
0
 /**
  * @inheritdoc
  */
 public function findAll()
 {
     $collection = new TrackingUnitCollection();
     $dbAdapter = $this->getDbAdapter();
     $select = new Select(Utils::getTrackingTableName());
     $select->order(array(Utils::getTrackingTableName(), Select::ORDER_ASCENDING));
     $sql = $select->getSqlString($dbAdapter->getPlatform());
     $results = $dbAdapter->query($sql, DbAdapter::QUERY_MODE_EXECUTE);
     foreach ($results as $rowData) {
         $trackingUnit = $this->loadTrackingUnit($rowData);
         $collection->attach($trackingUnit);
     }
     //end loop
     return $collection;
 }