/** * This function has got a weird name, because it does not do anything else * only inspect the getOutputFlow function of the output handler and decides * what to do with the $testsring variable it receives. This tries to * emulate the behahviour of the server to the $poc object. * * @param $poc Poc * @param $outputHandler TestOutput * @param $testString string */ public function pocBurner(Poc $poc, $testString = "testString") { if ($poc->getEventDispatcher()->hasPlugin(PocLogs::PLUGIN_NAME)) { $poc->addPlugin(new PocLogs()); } $this->setOutput(''); $poc->start(); if ($poc->getEventDispatcher()->hasPlugin(HttpCapture::PLUGIN_NAME)) { $outputHandler = $poc->getEventDispatcher()->getPlugin(HttpCapture::PLUGIN_NAME)->getOutputHandler(); } if ($outputHandler->getOutputFlow()) { echo $testString; $poc->end(); //var_dump($outputHandler); $this->setHeader($outputHandler->getallheaders()); $this->setOutput($outputHandler->getOutput()); } else { $this->setHeader($outputHandler->getallheaders()); $this->setOutput($outputHandler->getOutput()); $poc->end(); //var_dump($outputHandler); if ($outputHandler->getOutput()) { $this->setHeader($outputHandler->getallheaders()); $this->setOutput($outputHandler->getOutput()); } } }