Graby\Extractor\HttpClient::__construct PHP Method

__construct() public method

public __construct ( Client $client, array $config = [], Psr\Log\LoggerInterface $logger = null )
$client GuzzleHttp\Client Guzzle client
$config array
$logger Psr\Log\LoggerInterface
    public function __construct(Client $client, $config = array(), LoggerInterface $logger = null)
    {
        $this->client = $client;
        $resolver = new OptionsResolver();
        $resolver->setDefaults(array('ua_browser' => 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.92 Safari/535.2', 'default_referer' => 'http://www.google.co.uk/url?sa=t&source=web&cd=1', 'rewrite_url' => array('docs.google.com' => array('/Doc?' => '/View?'), 'tnr.com' => array('tnr.com/article/' => 'tnr.com/print/article/'), '.m.wikipedia.org' => array('.m.wikipedia.org' => '.wikipedia.org'), 'm.vanityfair.com' => array('m.vanityfair.com' => 'www.vanityfair.com')), 'header_only_types' => array('application/pdf', 'image', 'audio', 'video'), 'header_only_clues' => array('pdf', 'mp3', 'zip', 'exe', 'gif', 'gzip', 'gz', 'jpeg', 'jpg', 'mpg', 'mpeg', 'png', 'ppt', 'mov'), 'user_agents' => array(), 'ajax_triggers' => array("<meta name='fragment' content='!'", '<meta name="fragment" content="!"', "<meta content='!' name='fragment'", '<meta content="!" name="fragment"', ' ng-controller='), 'timeout' => 10, 'max_redirect' => 10));
        $this->config = $resolver->resolve($config);
        $this->logger = $logger;
        if (null === $logger) {
            $this->logger = new NullLogger();
        }
    }