2011-07-14 5 views
0

それがグローバルZendのプロパティ・ストレージ・システムまたは何であれば、私は知りませんが、私は次のコードのようなものを作成するとき:PHPのZendのGDataのPicasa /写真のプロパティ

$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の "title"などの項目を含むリストを取得するにはどうすればよいですか?

ありがとうございました!

答えて

0

これはまさに答えではありませんが、以下の行でデバッグしようとしましたか?

} 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

+0

はい、私は現在使用しています(私はちょうどポイントに右に行きたがっていました...つまり立ち上がって、簡単に座ってください)。基本的には、 "property {name}は存在しません"とキャッチするだけです。しかし、返信いただきありがとうございます! – Nitroware

関連する問題