コード例 #1
0
 /**
  * @return string
  */
 public function getUrl()
 {
     if (is_null($this->url)) {
         $this->url = $this->sourceSite->getCategoryUrl($this->getSourceSiteCategoryId());
     }
     return $this->url;
 }
コード例 #2
0
 /**
  * @param ProductSource $sourceSite
  * @param string $syncTime
  */
 public function cleanup($sourceSite, $syncTime)
 {
     $statement = $this->connection->prepare('
         UPDATE imported_products
         SET active = FALSE
         WHERE time_modified < :lastUpdateTime AND source_site_class_name = :sourceSiteClassName
     ');
     $statement->execute(array(':lastUpdateTime' => date('Y-m-d H:i:s', $syncTime), ':sourceSiteClassName' => $sourceSite->getSite()->getClassName()));
 }