newEntry() question

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

newEntry() question

Andrew Peterson
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
Reply | Threaded
Open this post in threaded view
|

Re: newEntry() question

Peter Warnock-3
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 <[hidden email]> 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