Ejemplo n.º 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('/(.*)/');
     }
 }
Ejemplo n.º 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'));
     }
 }
Ejemplo n.º 3
0
 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.");
     }
 }
Ejemplo n.º 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]);
         }
     }
 }