예제 #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;
 }