Class Picasa_Comment

Description

Represents a comment left for a Picasa photo.

  • author: Cameron Hinkle
  • version: Version 3.0
  • copyright: Copyright (c) 2007 Cameron Hinkle
  • since: Version 2.0
  • license: GNU Public License Version 3

Located in /Picasa/Comment.php (line 16)


	
			
Variable Summary
string $accountName
string $albumid
{@link $author
string $content
string $id
string $idnum
int $photoid
string $published
string $title
string $updated
Method Summary
static array getCommentArray ([string $url = null], [ $xml = null], [array $contextArray = null], [boolean $useCache = true])
Picasa_Comment __construct ([ $comments = null], [string $url = null], [array $contextArray = null], [boolean $useCache = true])
string getAccountName ()
string getAlbumid ()
string getContent ()
string getId ()
string getIdnum ()
int getPhotoid ()
string getPublished ()
string getTitle ()
string getUpdated ()
void setAccountName (string $accountName)
void setAlbumid (string $albumid)
void setAuthor (Picasa_Author $author)
void setContent (string $content)
void setId (string $id)
void setIdnum (string $idnum)
void setPhotoid (id $photoidid)
void setPublished (string $published)
void setTitle (string $title)
void setUpdated (string $updated)
string __toString ()
Variables
string $accountName (line 79)

The username of the account the comment was posted to.

  • access: private
string $albumid (line 86)

The albumid of the album that the image of the comment is in.

  • access: private
{@link $author (line 51)

The author of the comment.

  • var: Picasa_Author}
  • access: private
string $content (line 65)

The comment's text.

  • access: private
string $id (line 23)

The URL of the Atom feed for the comment.

  • access: private
string $idnum (line 72)

A unique number assigned to the comment.

  • access: private
int $photoid (line 58)

The unique numeric value assigned to the photo by Picasa.

  • access: private
string $published (line 30)

The time and date the comment was submitted.

  • access: private
string $title (line 37)

The title of the comment.

  • access: private
string $updated (line 44)

The time and date the comment was updated.

  • access: private
Methods
static method getCommentArray (line 353)

Constructs an array of Picasa_Comment objects based on the XML taken from either the $xml parameter or from the contents of $url.

static array getCommentArray ([string $url = null], [ $xml = null], [array $contextArray = null], [boolean $useCache = true])
  • string $url: A URL pointing to a Picasa Atom feed that has zero or more "entry" nodes represeing a Picasa comment. Optional, the default is null. If this parameter is null, the method will try to get the XML content from the $xml parameter directly.
  • SimpleXMLElement $xml: XML from a Picasa Atom feed that has zero or more "entry" nodes represeing a Picasa comment. Optional, the default is null. If the $url parameter is null and the $xml parameter is null, a {@Picasa_Exception} is thrown.
  • array $contextArray: An array that can be passed to stream_context_create() to generate a PHP context. See http://us2.php.net/manual/en/function.stream-context-create.php
  • 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.
Constructor __construct (line 255)

Constructs a Picasa_Comment object from XML.

You'll notice that the parameters are in a different order than with other similar classes in the API. This is because it was initially created without a $url or $contextArray parameter and to maintain backwards compatibility, the two extra parameters had to be appended to the end.

  • throws: Picasa_Exception If the XML suppled through either parameter does not contain valid XML.
  • access: public
Picasa_Comment __construct ([ $comments = null], [string $url = null], [array $contextArray = null], [boolean $useCache = true])
  • SimpleXMLElement $comments: XML representing a Picasa comment.
  • string $url: A URL pointing to the Atom feed for the requested data. Optional, the default is null. If null is passed, the method assumes that the XML is supplied in the $comments parameter.
  • array $contextArray: An array that can be passed to stream_context_create() to generate a PHP context. See http://us2.php.net/manual/en/function.stream-context-create.php
  • 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.
getAccountName (line 147)
  • access: public
string getAccountName ()
getAlbumid (line 154)
  • access: public
string getAlbumid ()
getAuthor (line 119)
  • access: public
Picasa_Author getAuthor ()
getContent (line 133)
  • access: public
string getContent ()
getId (line 91)
  • access: public
string getId ()
getIdnum (line 140)
  • access: public
string getIdnum ()
getPhotoid (line 126)
  • access: public
int getPhotoid ()
getPublished (line 98)
  • access: public
string getPublished ()
getTitle (line 105)
  • access: public
string getTitle ()
getUpdated (line 112)
  • access: public
string getUpdated ()
setAccountName (line 227)
  • access: public
void setAccountName (string $accountName)
  • string $accountName
setAlbumid (line 235)
  • access: public
void setAlbumid (string $albumid)
  • string $albumid
setAuthor (line 194)
  • access: public
void setAuthor (Picasa_Author $author)
setContent (line 210)
  • access: public
void setContent (string $content)
  • string $content
setId (line 162)
  • access: public
void setId (string $id)
  • string $id
setIdnum (line 218)
  • access: public
void setIdnum (string $idnum)
  • string $idnum
setPhotoid (line 202)
  • access: public
void setPhotoid (id $photoidid)
  • id $photoidid
setPublished (line 170)
  • access: public
void setPublished (string $published)
  • string $published
setTitle (line 178)
  • access: public
void setTitle (string $title)
  • string $title
setUpdated (line 186)
  • access: public
void setUpdated (string $updated)
  • string $updated
__toString (line 317)

Constructs a textual representation of the current Picasa_Comment instantiation.

  • access: public
string __toString ()

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