src/Extractor/HttpClient.php
private function getReferer($url, $httpHeader = [])
    {
        $default_referer = $this->config['default_referer'];

        if (!empty($httpHeader['referer'])) {
            $this->logger->info('Found referer "{referer}" for url "{url}" from site config', ['referer' => $httpHeader['referer'], 'url' => $url]);

            return $httpHeader['referer'];
        }

        $this->logger->info('Use default referer "{referer}" for url "{url}"', ['referer' => $default_referer, 'url' => $url]);

        return $default_referer;
    }
private function getReferer($url, $httpHeader = [])
    {
        $default_referer = $this->config['default_referer'];

        if (!empty($httpHeader['referer'])) {
            $this->logger->info('Found referer "{referer}" for url "{url}" from site config', ['referer' => $httpHeader['referer'], 'url' => $url]);

            return $httpHeader['referer'];
        }

        $this->logger->info('Use default referer "{referer}" for url "{url}"', ['referer' => $default_referer, 'url' => $url]);

        return $default_referer;
    }
private function getReferer ( $ url , $ httpHeader = [ ] ) { $ default_referer = $ this -> config [ 'default_referer' ] ; if ( ! empty ( $ httpHeader [ 'referer' ] ) ) { $ this -> logger -> info ( 'Found referer "{referer}" for url "{url}" from site config' , [ 'referer' => $ httpHeader [ 'referer' ] , 'url' => $ url ] ) ; return $ httpHeader [ 'referer' ] ; } $ this -> logger -> info ( 'Use default referer "{referer}" for url "{url}"' , [ 'referer' => $ default_referer , 'url' => $ url ] ) ; return $ default_referer ; }
Find a Referer for this url.
Based on the site config, it will return the Referer if any.
Otherwise it will use the default one.

@param string $url        Absolute url
@param array  $httpHeader Custom HTTP Headers from SiteConfig

@return string
Find a Referer for this url . Based on the site config it will return the Referer if any . Otherwise it will use the default one .