Class Picasa_Account

Description

Represents a Picasa Account, which holds an array of Albums. The general idea is to instantiate an instance of this object using XML from Picasa's Atom feed and then access the needed information about the Picasa account through getters and setters.

Located in /Picasa/Account.php (line 20)


	
			
Variable Summary
array $albums
string $author
string $icon
string $id
{@link $picasaAuthor
string $subtitle
string $title
string $weblink
Method Summary
Picasa_Account __construct ([string $url = null], [ $xml = null], [array $contextArray = null], [boolean $useCache = true])
array getAlbums ()
string getAuthor ()
string getIcon ()
string getId ()
string getSubtitle ()
string getTitle ()
string getWeblink ()
void setAlbums (array $albums)
void setAuthor (string $author)
void setIcon (string $icon)
void setId (string $id)
void setPicasaAuthor (Picasa_Author $picasaAuthor)
void setSubtitle (string $subtitle)
void setTitle (string $title)
void setWeblink (string $weblink)
string __toString ()
Variables
array $albums (line 26)

An array of Picsaa_Album objects for each album in the requested feed.

  • access: private
string $author (line 33)

The name of the Account's owner.

  • deprecated: Since Version 2.0. Use $picasaAuthor instead.
  • access: private
string $icon (line 57)

A URL to the account icon, probably the author's icon.

  • access: private
string $id (line 39)

The base URL of the feed that was requested.

  • access: private
{@link $picasaAuthor (line 64)

The account author.

  • var: Picasa_Author}
  • since: Version 2.0
  • access: private
string $subtitle (line 51)

The account subtitle, probably blank.

  • access: private
string $title (line 45)

The account title, probably the owner's username.

  • access: private
string $weblink (line 72)

The URL to account in PicasaWeb.

  • access: private
Methods
Constructor __construct (line 223)

Constructs an Account object.

This method assigns Album objects to the Account, but the Album objects that are constructed will not initially contain Image objects. This is because the XML that is returned from Picasa does not contain individual Image nodes for each Album, presumeably because it could potentially take a lot of time to fetch every image in an Account when all you likely need are the Albums. Starting with version 3.0 of this API, the images are fetched from Picasa when Picasa_Album::getImages() is called and Picasa_Album::$images is null.

  • throws: Picasa_Exception If valid XML cannot be retrieved from the URL specified in $url or $xml.
  • access: public
Picasa_Account __construct ([string $url = null], [ $xml = null], [array $contextArray = null], [boolean $useCache = true])
  • string $url: The URL for the specific query that should be returned, as defined in Picasa's API documentation (http://code.google.com/apis/picasaweb/gdata.html). Optional, the default is null. If this parameter is null, the xml must come from the $xml parameter.
  • SimpleXMLElement $xml: XML from a Picasa Atom feed represeting a Picasa Account. Optional, the default is null. If this parameter and the $url parameters are both null, a Picasa_Exception is thrown. You cannot create an empty Picasa_Account instance.
  • array $contextArray: An array that can be passed to the PHP built in function http://www.php.net/stream_context_create. It contains useful information when retrieving a feed, including headers that might include needed authorization information.
  • boolean $useCache: You can decide not to cache a specific request by passing false here. You may want to do this, for instance, if you're requesting a private feed.
getAlbums (line 77)
  • access: public
array getAlbums ()
getAuthor (line 84)
  • access: public
string getAuthor ()
getIcon (line 113)
  • access: public
string getIcon ()
getId (line 91)
  • access: public
string getId ()
getPicasaAuthor (line 120)
  • access: public
Picasa_Author getPicasaAuthor ()
getSubtitle (line 106)
  • access: public
string getSubtitle ()
getTitle (line 98)
  • access: public
string getTitle ()
getWeblink (line 128)
  • access: public
string getWeblink ()
setAlbums (line 136)
  • access: public
void setAlbums (array $albums)
  • array $albums
setAuthor (line 144)
  • access: public
void setAuthor (string $author)
  • string $author
setIcon (line 176)
  • access: public
void setIcon (string $icon)
  • string $icon
setId (line 152)
  • access: public
void setId (string $id)
  • string $id
setPicasaAuthor (line 184)
  • access: public
void setPicasaAuthor (Picasa_Author $picasaAuthor)
setSubtitle (line 168)
  • access: public
void setSubtitle (string $subtitle)
  • string $subtitle
setTitle (line 160)
  • access: public
void setTitle (string $title)
  • string $title
setWeblink (line 193)
  • access: public
void setWeblink (string $weblink)
  • string $weblink
__toString (line 286)

Constructs a textual representation of everything in the current instantiation of the object.

  • access: public
string __toString ()

Documentation generated on Tue, 02 Jun 2009 14:51:47 -0700 by phpDocumentor 1.4.1