def('api.url', 'https://www.googleapis.com/plus/v1/'); parent::__construct($options, $auth); if (isset($this->auth) && !$this->auth->getOption('scope')) { $this->auth->setOption('scope', 'https://www.googleapis.com/auth/plus.me'); } } /** * Magic method to lazily create API objects * * @param string $name Name of property to retrieve * * @return JGoogleDataPlus Google+ API object (people, activities, comments). * * @since 12.3 */ public function __get($name) { switch ($name) { case 'people': if ($this->people == null) { $this->people = new JGoogleDataPlusPeople($this->options, $this->auth); } return $this->people; case 'activities': if ($this->activities == null) { $this->activities = new JGoogleDataPlusActivities($this->options, $this->auth); } return $this->activities; case 'comments': if ($this->comments == null) { $this->comments = new JGoogleDataPlusComments($this->options, $this->auth); } return $this->comments; } } }