/** * Creates a Zend http adapter. * * @param \Zend\Http\Client $client The Zend client. * @param integer $maxRedirects The max redirects. */ public function __construct(Client $client = null, $maxRedirects = 5) { parent::__construct($maxRedirects); if ($client === null) { $client = new Client(); } $this->client = $client; }
/** * Constructor. * * @param \Buzz\Browser $browser The buzz browser. * @param integer $maxRedirects The maximum redirects. */ public function __construct(Browser $browser = null, $maxRedirects = 5) { parent::__construct($maxRedirects); if ($browser === null) { $browser = new Browser(); } $this->browser = $browser; }