public function processResult(Result $result) { if ($result->isSuccess()) { $this->renderSuccess($result); } else { $this->renderFailure($result); } }
public function scan() { $this->eventDispatcher->simpleNotify('Scanner.Scan.Begin'); while (($response = $this->responseRetriever->next()) && !$this->eventDispatcher->notifyUntil(new Event('Scanner.Scan.isStopped'))) { // this is the url filter if ($this->eventDispatcher->notifyUntil(new Event('Scanner.ProcessHtml.isFiltered', array('uri' => $response->getUri())))) { continue; } $resultArray = $this->checkResponse($response); $result = new Result($response->getUri(), $resultArray['type'], $response, '', $resultArray['time']); if ($result->isFailure()) { $result->setMessages($resultArray['messages']); $this->status = 1; } $this->eventDispatcher->simpleNotify('Scanner.Scan.Validate', array('result' => $result)); } $this->eventDispatcher->simpleNotify('Scanner.Scan.Finish'); }
public function processResult(Result $result) { ++$this->urlCount; $this->output->writeln(' ' . $result->getUrl()); $this->output->writeln(''); }
protected function renderSuccess(Result $result) { $this->output->writeln(' <info> ' . $result->getUrl() . ' </info> all tests passed'); }