示例#1
0
 /**
  * Returns the connector of the google contacts
  * @return Google_Contacts_Connector
  */
 public function getTargetConnector()
 {
     $oauth2Connector = new Google_Oauth2_Connector($this->getSourceType(), $this->user->id);
     $oauth2Connection = $oauth2Connector->authorize();
     $connector = new Google_Contacts_Connector($oauth2Connection);
     $connector->setSynchronizeController($this);
     return $connector;
 }
示例#2
0
 public function getTargetConnector()
 {
     $oauth2Connector = new Google_Oauth2_Connector("Calendar", $this->user->id);
     $oauth2Connection = $oauth2Connector->authorize();
     $connector = new Google_Calendar_Connector($oauth2Connection);
     $connector->setSynchronizeController($this);
     return $connector;
 }