Ejemplo n.º 1
0
 public function __construct(array $rules, HttpAdapterInterface $client, Dispatcher $eventDispatcher, Retriever $responseRetriever)
 {
     $eventDispatcher->simpleNotify('Scanner.Init', array('rules' => $rules, 'httpClient' => $client, 'dispatcher' => $eventDispatcher));
     $this->rules = $rules;
     $this->eventDispatcher = $eventDispatcher;
     $this->responseRetriever = $responseRetriever;
     $this->eventDispatcher->simpleNotify('Scanner.Init.ResponseRetriever', array('responseRetriever' => $this->responseRetriever));
 }
Ejemplo n.º 2
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]);
         }
     }
 }