public function __construct($serviceName, $version) { parent::__construct(); $this->serviceName = $serviceName; $this->version = $version; $this->discoveryUrl = 'http://www.googleapis.com/discovery/' . $this->discoveryVersion . '/describe?api=' . urlencode($this->serviceName) . '&apiVersion=' . urlencode($this->version); }