2011-06-13 85 views

回答

0

這可能會有所幫助:

 
public function sendInvite($eventId, $email) 
{ 
    $gdataCal = new Zend_Gdata_Calendar($this->client); 

    if($eventOld = $this->getEvent($eventId)) 
    { 
     $SendEventNotifications = new Zend_Gdata_Calendar_Extension_SendEventNotifications(); 
     $SendEventNotifications->setValue(true); 
     $eventOld->SendEventNotifications = $SendEventNotifications; 
     $who = $gdataCal->newwho(); 
     $who->setEmail($email); 

     $eventOld->setWho(array_merge(array($who), $eventOld->getWho())); 

     try 
     { 
      $eventOld->save(); 
     } catch(Zend_Gdata_App_Exception $e) 
     { 
      return false; 
     } 

     return true; 
    } else 
     return false; 
} 
相關問題