public function __construct($client_id, $client_secret, $curlbuilder = null) { if ($curlbuilder == null) { $curlbuilder = new CurlBuilder(); } // Create new instance of Transport\Request $this->request = new Request($curlbuilder); // Create and set new instance of the OAuth class $this->auth = new PinterestOAuth($client_id, $client_secret, $this->request); }