コード例 #1
0
ファイル: Crawler.php プロジェクト: Keyzanh/Crawler
 public function __construct($name, $conf, $log = null)
 {
     parent::__construct();
     $this->profileName = $name;
     $this->conf = $conf;
     if (empty($conf['informations'])) {
         return;
     }
     $this->conf['informations'] = explode(',', $conf['informations']);
     if ($log) {
         $this->log = $log;
     }
     $this->ready = true;
 }
コード例 #2
0
ファイル: Catalog.php プロジェクト: Keyzanh/Crawler
 public function __construct($name, $conf, $log = null)
 {
     parent::__construct();
     $this->profileName = $name;
     $this->conf = $conf;
     $this->loadDriver();
     if ($log) {
         $this->log = $log;
     }
     if (empty($this->conf['save-to'])) {
         $this->logError('No destination to save the catalog specified for profile ' . $this->profileName);
         return false;
     }
     $this->addFirstLine();
     $this->ready = true;
 }
コード例 #3
0
ファイル: Profile.php プロジェクト: Keyzanh/Crawler
 public function __construct($name, $conf)
 {
     parent::__construct();
     $this->profileName = $name;
     $this->conf = $conf;
     if (false === $this->_loadCrawler()) {
         return;
     }
     if (false === $this->_loadCatalog()) {
         return;
     }
     if (false === $this->crawler->isReady()) {
         return;
     }
     if (false === $this->catalog->isReady()) {
         return;
     }
     $this->_configureLog();
     $this->_loadContext();
     $this->ready = true;
 }