示例#1
0
 public function init(Configuration $_configuration)
 {
     if ($_configuration->hasSection('blacklist')) {
         $this->blacklist = $_configuration->getSection('blacklist');
     }
     if ($_configuration->hasSection('whitelist')) {
         $this->whitelist = $_configuration->getSection('whitelist');
     } else {
         $this->whitelist = array('/(.*)/');
     }
 }
示例#2
0
 public function init(OutputInterface $_output, Configuration $_configuration)
 {
     $this->output = $_output;
     $this->config = $_configuration;
     if ($_configuration->hasSection('reporter')) {
         $this->reporters = Init::initializeAll($_configuration->getSection('reporter'));
     }
 }
 public function init(Configuration $_configuration)
 {
     if ($_configuration->hasSection('responseRetriever')) {
         $this->retriever = Init::initialize($_configuration->getSection('responseRetriever'));
     } else {
         throw new \RuntimeException("No response retriever set. Please check the config file if a section 'responseRetriever' exists.");
     }
 }
示例#4
0
 public function init(Configuration $_configuration, Dispatcher $_eventDispatcher)
 {
     if ($_configuration->hasSection('stop')) {
         $strategies = $_configuration->getSection('stop');
         foreach ($strategies as $name => $strategy) {
             $this->stopStrategies[$name] = Init::initialize($strategy);
             $_eventDispatcher->connectListener($this->stopStrategies[$name]);
         }
     }
 }