Visualizzazione dei risultati da 1 a 2 su 2
  1. #1

    Zend Framework- problemi con gdata

    Ciao a tutti

    Io ho creato questo codice:

    Codice PHP:
    chdir ("ZendFramework-1.0.0/library/");

    require_once 
    'Zend/Loader.php';
    Zend_Loader::loadClass('Zend_Gdata');
    Zend_Loader::loadClass('Zend_Gdata_AuthSub');
    Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
    Zend_Loader::loadClass('Zend_Gdata_Calendar');

    $user 'username';
    $pass 'password';
    $client Zend_Gdata_ClientLogin::getHttpClient(
                            
    $user$pass,
                            
    Zend_Gdata_Calendar::AUTH_SERVICE_NAME);
    $calendar_service = new Zend_Gdata_Calendar($client);

    $query $calendar_service->newEventQuery();
    $query->setUser('default');
    $query->setVisibility('private');
    $query->setProjection('full');
    $query->setOrderby('starttime');
    $query->setFutureEvents('true');

    try
    {
        
    $eventFeed $calendar_service->getCalendarEventFeed($query);

    // ora posso applicare le modifiche ad una entry specifica
     
            
    $event $eventFeed[0];
            
    $event->title $service->newTitle("Titolo dell'evento modificato");      
            
    $event->save();
            
    } catch (
    Zend_Gdata_App_Exception $e)
    {
        echo 
    "Error: " $e->getResponse();

    Dentro il try mi arriva.
    Mi arriva fino a $eventFeed = $calendar_service->getCalendarEventFeed($query);
    Poi non va "avanti"...
    mi sorge il dubbio che non ho settato la $query, correttamente..
    Chi mi sa aiutare??

  2. #2

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.