Visithor\Executor\Executor::executeUrl PHP Method

executeUrl() protected method

If the url is executed as expected, then the result of the operation will be 0. Otherwise, the result will be 1.
protected executeUrl ( Visithor\Client\Interfaces\ClientInterface $client, Url $url, Visithor\Renderer\Interfaces\RendererInterface $renderer, Symfony\Component\Console\Output\OutputInterface $output ) : boolean
$client Visithor\Client\Interfaces\ClientInterface Client
$url Visithor\Model\Url Url
$renderer Visithor\Renderer\Interfaces\RendererInterface Renderer
$output Symfony\Component\Console\Output\OutputInterface Output
return boolean Result of the execution
    protected function executeUrl(ClientInterface $client, Url $url, RendererInterface $renderer, OutputInterface $output)
    {
        $resultHTTPCode = $client->getResponseHTTPCode($url);
        $resultExecution = in_array($resultHTTPCode, $url->getAcceptableHttpCodes()) ? 0 : 1;
        $renderer->render($output, $url, $resultHTTPCode, 0 === $resultExecution);
        return $resultExecution;
    }