2010年6月4日星期五

Re: [fw-gdata] newEntry() question

It's a magic method that executes __call.

From http://framework.zend.com/svn/framework/standard/trunk/demos/Zend/Gdata/Blogger.php:
// We're using the magic factory method to create a Zend_Gdata_Entry.
// http://framework.zend.com/manual/en/zend.gdata.html#zend.gdata.introdduction.magicfactory
$entry = $this->gdClient->newEntry();

More info can be found here:
http://code.google.com/apis/blogger/docs/1.0/developers_guide_php.html

- pw

On Fri, Jun 4, 2010 at 12:12 PM, Andrew Peterson <gretschdrummer@gmail.com> wrote:
I'm new to ZF and definitely new to GData.  I'm looking at some sample code and trying to find the corresponding documentation for it.

The example code:
-------------------------------------------------
<?PHP
require_once 'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Gdata');
Zend_Loader::loadClass('Zend_Gdata_Feed');
Zend_Loader::loadClass('Zend_Gdata_Query');
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');

$client = Zend_Gdata_ClientLogin::getHttpClient($email, $password, 'blogger');
$gdClient = new Zend_Gdata($client);
$entry = $gdClient->newEntry();

?>
-------------------------------------------------

Why is it that when I print out the method listing for $gdClient, I don't see the "newEntry()" method?

I also can't find the newEntry() method in any other class in the ZF->GData documentation.

Does anyone have anying good pointers or places for me to look?

Thanks for all the help,
Andrew

没有评论: