【问题标题】:PHP Zend GData Picasa/Photo PropertiesPHP Zend GData Picasa/照片属性
【发布时间】:2011-07-14 21:22:37
【问题描述】:

我不知道是不是全局 Zend 属性存储系统还是什么,但是当我创建以下类型的代码时:

$serviceName = Zend_Gdata_Photos::AUTH_SERVICE_NAME;
$client = Zend_Gdata_ClientLogin::getHttpClient($username, $pass, $serviceName);

// update the second argument to be CompanyName-ProductName-Version
$gp = new Zend_Gdata_Photos($client, "Google-DevelopersGuide-1.0");

$userFeed = $gp->getUserFeed("default");
foreach ($userFeed as $userEntry) {
    echo $userEntry->title->text . "<br />\n";
}

我似乎无法获得指定 $userEntry 的所有属性。当我执行 print_r 时,它只是给了我元素的结构,而不是实际的数据。

我的问题是如何获取包含 $userEntry 的“标题”等项目的列表?

提前一百万谢谢!

【问题讨论】:

    标签: php zend-framework properties gdata picasa


    【解决方案1】:

    这并不完全是一个答案,但您是否尝试过使用以下行进行调试?

    } catch (Zend_Gdata_App_HttpException $e) {
    echo "Error: " . $e->getMessage() . "<br />\n";
    if ($e->getResponse() != null) {
        echo "Body: <br />\n" . $e->getResponse()->getBody() . 
             "<br />\n"; 
    }
    // In new versions of Zend Framework, you also have the option
    // to print out the request that was made.  As the request
    // includes Auth credentials, it's not advised to print out
    // this data unless doing debugging
    // echo "Request: <br />\n" . $e->getRequest() . "<br />\n";
    } catch (Zend_Gdata_App_Exception $e) {
        echo "Error: " . $e->getMessage() . "<br />\n"; 
    }
    

    gl 保罗·布埃诺。

    编辑:另见这篇帖子Zend_Gdata_Photos listing all albums and photos

    【讨论】:

    • 是的,我目前正在使用它(我只是想直截了当......即站起来,简短,坐下)。本质上,这只是捕获“属性 {name} 不存在”。不过感谢您的回复!
    猜你喜欢
    • 1970-01-01
    • 2015-08-09
    • 1970-01-01
    • 1970-01-01
    • 2011-05-18
    • 2011-05-23
    • 2016-07-03
    • 1970-01-01
    • 2013-07-19
    相关资源
    最近更新 更多