Class Picasa_Image

Description

Represents a single image in a Picasa account.

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

Located in /Picasa/Image.php (line 19)


	
			
Variable Summary
int $albumid
string $albumTitle
{@link $author
string $cameraMake
string $cameraModel
string $commentCount
array $comments
string $content
string $description
float $exposure
boolean $flash
float $focalLength
float $fstop
string $gmlPosition
int $height
string $id
string $idnum
string $imageType
int $iso
string $keywords
string $largeThumb
string $mediumThumb
{@link $next
{@link $previous
string $smallThumb
array $tags
array $thumbnails
array $thumbUrlMap
string $timestamp
string $title
string $updated
int $version
string $weblink
int $width
Method Summary
Picasa_Image __construct ([string $url = null], [ $albums = null], [array $contextArray = null], [boolean $useCache = true])
string getAlbumid ()
string getAlbumTitle ()
string getCameraMake ()
string getCameraModel ()
array getComments ()
string getContent ()
array getContentUrlMap ()
string getDescription ()
float getExposure ()
boolean getFlash ()
float getFocalLength ()
float getFstop ()
string getGmlPosition ()
int getHeight ()
string getId ()
string getIdnum ()
string getImageType ()
int getIso ()
array getKeywords ()
string getLargeThumb ()
string getMediumThumb ()
{@link getNext ()
{@link getPrevious ()
string getSmallThumb ()
array getTags ()
array getThumbnails ()
array getThumbUrlMap ()
string getTimestamp ()
string getTimeTaken ()
string getTitle ()
string getUpdated ()
int getVersion ()
string getWeblink ()
int getWidth ()
void setAlbumDescription (string $albumDescription)
void setAlbumid (string $albumid)
void setAlbumTitle (string $albumTitle)
void setAuthor (Picasa_Author $author)
void setCameraMake (string $cameraMake)
void setCameraModel (string $cameraModel)
void setCommentCount (int $commentCount)
void setCommentingEnabled (boolean $commentingEnabled)
void setComments (array $comments)
void setContent (string $content)
void setContentHeightMap (array $contentHeightMap)
void setContentUrlMap (array $contentUrlMap)
void setDescription (string $description)
void setExposure (float $exposure)
void setFlash (boolean $flash)
void setFocalLength (float $focalLength)
void setFstop (float $fstop)
void setGmlPosition (string $gmlPosition)
void setHeight (int $height)
void setId (string $id)
void setIdnum (string $idnum)
void setImageType (string $imageType)
void setIso (int $iso)
void setKeywords (string $keywords)
void setLargeThumb (string $largeThumb)
void setMediumThumb (string $mediumThumb)
void setNext ({@link $next)
void setPrevious ({@link $previous)
void setSmallThumb (string $smallThumb)
void setTags (string $tags)
void setThumbHeightMap (array $thumbHeightMap)
void setThumbnails (array $thumbnails)
void setThumbUrlMap (array $thumbUrlMap)
void setTimestamp (string $timestamp)
void setTimeTaken (string $timeTaken)
void setTitle (string $title)
void setUpdated (string $updated)
void setVersion (int $version)
void setWeblink (string $weblink)
void setWidth (int $width)
string __toString ()
Variables
string $albumDescription (line 271)
  • access: private
int $albumid (line 215)

The id number of the Album the image is in.

  • access: private
string $albumTitle (line 255)
  • access: private
{@link $author (line 247)
  • var: Picasa_Author}
  • access: private
string $cameraMake (line 295)
  • access: private
string $cameraModel (line 303)
  • access: private
string $commentCount (line 223)

The number of comments entered for the image.

  • access: private
boolean $commentingEnabled (line 351)
  • access: private
array $comments (line 239)

An array of Picasa_Comment objects containing all the comments for the image.

  • access: private
string $content (line 164)

A downloadable link to the full size of the photo.

This URL cannot be seen inside a <img> HTML tag. Instead, use thumbnails. Though this field is deprecated, it can still be used for simplicity. If only one size was requested (which is the default case), then this field will contain the URL to that image size. If more than one size is requested, this field will contain the URL of the smallest one.

  • deprecated: Deprecated since Version 3.0. Use $contentUrlMap instead.
  • access: private
array $contentHeightMap (line 183)
  • access: private
array $contentUrlMap (line 175)

A map of image widths to their respective URLs.

This map mimicks the $thumbUrlMap field, except these URLs are not thumbnails and can't be used inside <img> HTML tags. In practice, only one image size can be requested. This field was created because users who are

  • access: private
array $contextArray (line 30)

An array that can be passed to stream_create_context() to get a context.

This context array is used rather than just an auth token because the context array holds both the auth token and the type of authentication that was performed. The context can be passed as a parameter when instantiating a Picasa object to make the instantiation authenticated.

  • access: private
string $description (line 63)

A description of the image, entered by the account owner.

  • access: private
float $exposure (line 311)
  • access: private
boolean $flash (line 279)
  • access: private
float $focalLength (line 319)
  • access: private
float $fstop (line 287)
  • access: private
string $gmlPosition (line 371)

The location that the image was taken.

The format is latitude and longitude, separated by a space. This is often left blank, the Picasa_Album::$location field is more reliable.

  • since: Version 3.0
  • access: private
int $height (line 207)

The original height of the image.

  • access: private
string $id (line 39)

The URL to the image's page on PicasaWeb.

  • access: private
string $idnum (line 191)

A unique number assigned to the image by Picasa, unique across all Picasa images.

  • access: private
string $imageType (line 263)
  • access: private
int $iso (line 327)
  • access: private
string $keywords (line 71)

A comma seperated list of keywords for the image (Deprecated, use $tags).

  • access: private
string $largeThumb (line 111)

The largest thumbnail provided by Picasa by default.

288px on the longest side by default. Even though this field is deprecated, it can be used for simplicity. If three or more thumbnail sizes are requested, this field will contain a link to the third-largest one. If only one or two thumbnail sizes are requested, this field will be null (so be careful). By default, three thumbnails are requested so this field will be filled if no thumbnail size is specifically requested.

  • deprecated: Deprecated since Version 3.0. Use $thumbUrlMap instead.
  • access: private
string $mediumThumb (line 97)

The middle thumbnail provided by Picasa by default.

144px on the longest side by default. Even though this field is deprecated, it can be used for simplicity. If two or more thumbnail sizes are requested, this field will contain a link to the second-largest one. If only one thumbnail size is requested, this field will be null (so be careful). By default, three thumbnails are requested so this field will be filled if no thumbnail size is specifically requested.

  • deprecated: Deprecated since Version 3.0. Use $thumbUrlMap instead.
  • access: private
{@link $next (line 389)

The next image in the image's current album.

  • var: Picasa_Image}
  • since: Version 3.0
  • access: private
{@link $previous (line 380)

The previous image in the image's current album.

  • var: Picasa_Image}
  • since: Version 3.0
  • access: private
string $smallThumb (line 83)

A URL to the smallest thumbnail provided by Picasa by default.

72px on the longest side by default. Although this field is deprecated, it can be used for simplicity. The smallest thumbnail will always be placed in this field, even if a custom thumbnail size is used.

  • deprecated: Deprecated since Version 3.0. Use $thumbUrlMap instead.
  • access: private
array $tags (line 231)

An array of strings, one for each keyword associated with the image.

  • access: private
array $thumbHeightMap (line 140)

A mapping of thumbnail widths to their respective heights.

Use the thumbnail's width as a key to get it's height. The location of the thumbnail can be retrieved from the field $thumbUrlMap using, again, the width as a key.

array $thumbnails (line 151)

An array of Picasa_Thumbnail objects.

The sizes and number of thumbnails in this array will vary depending on what was requested.

array $thumbUrlMap (line 128)

A mapping of thumbnail widths to the URLs for those thumbnails.

This field was introduced because multiple thumbnail sizes can be requested. In order to keep track of which thumbnail URL is which size, this array was added. In order to not have to create a specific class that holds the thumbnail's URL, width, and height, the $thumbHeightMap array was created to map thumbnail widths to thumbnail heights. You can loop through this array and when you get a thumbnail you want using the width as a key, use the same key to get its height.

This is not really necessary if you request three or fewer thumbnail sizes at a time and you don't need to know the size of them. The deprecated fields $smallThumb, $mediumThumb, and $largeThumb will work just fine.

  • deprecated: Deprecated since Version 3.2. Use $thumbnails instead.
  • access: private
string $timestamp (line 360)

The number of miliseconds after January 1st, 1970 that the image was taken.

  • since: Version 3.0
  • access: private
int $timeTaken (line 335)
  • access: private
string $title (line 47)

The title or file name of the photo.

  • access: private
string $updated (line 55)

The date that the image was last updated.

  • access: private
int $version (line 343)
  • access: private
string $weblink (line 397)

The URL to actual imagepage PicasaWeb.

  • access: private
int $width (line 199)

The original width of the image.

  • access: private
Methods
Constructor __construct (line 1148)

Constructs an Image object.

  • throws: Picasa_Exception If the XML suppled through either parameter does not contain valid XML.
  • access: public
Picasa_Image __construct ([string $url = null], [ $albums = null], [array $contextArray = null], [boolean $useCache = true])
  • string $url: URL of the query for the data that should be returned based on Picasa's API documentation. See http://code.google.com/apis/picasaweb/gdata.html for instructions on how to formulate the URL. The URL parameter can be left blank, which will still produce a populated Image object as long as the $albums parameter contains XML from the Picasa Atom feed for an image.
  • SimpleXMLElement $albums: XML describing a Picasa image. This can be left blank as long as a URL is specified in the url parameter that returns valid XML for a Picasa image. If both are 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.
getAlbumDescription (line 608)
  • access: public
string getAlbumDescription ()
getAlbumid (line 539)
  • access: public
string getAlbumid ()
getAlbumTitle (line 592)
  • access: public
string getAlbumTitle ()
getAuthor (line 584)
  • access: public
Picasa_Author getAuthor ()
getCameraMake (line 632)
  • access: public
string getCameraMake ()
getCameraModel (line 640)
  • access: public
string getCameraModel ()
getCommentCount (line 547)
  • access: public
int getCommentCount ()
getCommentingEnabled (line 688)
  • access: public
boolean getCommentingEnabled ()
getComments (line 559)

Gets the comments for this image.

If the comments weren't supplied with the original image, this method will try to retrieve them again just to make sure.

  • access: public
array getComments ()
getContent (line 491)
  • access: public
string getContent ()
getContentHeightMap (line 507)
  • access: public
array getContentHeightMap ()
getContentUrlMap (line 499)
  • access: public
array getContentUrlMap ()
getDescription (line 427)
  • access: public
string getDescription ()
getExposure (line 648)
  • access: public
float getExposure ()
getFlash (line 616)
  • access: public
boolean getFlash ()
getFocalLength (line 656)
  • access: public
float getFocalLength ()
getFstop (line 624)
  • access: public
float getFstop ()
getGmlPosition (line 704)
  • access: public
string getGmlPosition ()
getHeight (line 531)
  • access: public
int getHeight ()
getId (line 403)
  • access: public
string getId ()
getIdnum (line 515)
  • access: public
string getIdnum ()
getImageType (line 600)
  • access: public
string getImageType ()
getIso (line 664)
  • access: public
int getIso ()
getKeywords (line 435)
  • access: public
array getKeywords ()
getLargeThumb (line 459)
  • access: public
string getLargeThumb ()
getMediumThumb (line 451)
  • access: public
string getMediumThumb ()
getNext (line 723)
  • return: Picasa_Image}
  • access: public
{@link getNext ()
getPrevious (line 712)
  • return: Picasa_Image}
  • access: public
{@link getPrevious ()
getSmallThumb (line 443)
  • access: public
string getSmallThumb ()
getTags (line 576)
  • access: public
array getTags ()
getThumbHeightMap (line 475)
  • access: public
array getThumbHeightMap ()
getThumbnails (line 483)
  • access: public
array getThumbnails ()
getThumbUrlMap (line 467)
  • access: public
array getThumbUrlMap ()
getTimestamp (line 696)
  • access: public
string getTimestamp ()
getTimeTaken (line 672)
  • access: public
string getTimeTaken ()
getTitle (line 411)
  • access: public
string getTitle ()
getUpdated (line 419)
  • access: public
string getUpdated ()
getVersion (line 680)
  • access: public
int getVersion ()
getWeblink (line 734)
  • access: public
string getWeblink ()
getWidth (line 523)
  • access: public
int getWidth ()
loadPreviousAndNext (line 745)

Loads the private members $previous and $next with the previous and next images in their album.

  • access: private
void loadPreviousAndNext ()
setAlbumDescription (line 990)
  • access: public
void setAlbumDescription (string $albumDescription)
  • string $albumDescription
setAlbumid (line 927)
  • access: public
void setAlbumid (string $albumid)
  • string $albumid
setAlbumTitle (line 972)
  • access: public
void setAlbumTitle (string $albumTitle)
  • string $albumTitle
setAuthor (line 963)
  • access: public
void setAuthor (Picasa_Author $author)
setCameraMake (line 1017)
  • access: public
void setCameraMake (string $cameraMake)
  • string $cameraMake
setCameraModel (line 1026)
  • access: public
void setCameraModel (string $cameraModel)
  • string $cameraModel
setCommentCount (line 936)
  • access: public
void setCommentCount (int $commentCount)
  • int $commentCount
setCommentingEnabled (line 1080)
  • access: public
void setCommentingEnabled (boolean $commentingEnabled)
  • boolean $commentingEnabled
setComments (line 945)
  • access: public
void setComments (array $comments)
  • array $comments
setContent (line 873)
  • access: public
void setContent (string $content)
  • string $content
setContentHeightMap (line 891)
  • access: public
void setContentHeightMap (array $contentHeightMap)
  • array $contentHeightMap
setContentUrlMap (line 882)
  • access: public
void setContentUrlMap (array $contentUrlMap)
  • array $contentUrlMap
setDescription (line 801)
  • access: public
void setDescription (string $description)
  • string $description
setExposure (line 1035)
  • access: public
void setExposure (float $exposure)
  • float $exposure
setFlash (line 999)
  • access: public
void setFlash (boolean $flash)
  • boolean $flash
setFocalLength (line 1044)
  • access: public
void setFocalLength (float $focalLength)
  • float $focalLength
setFstop (line 1008)
  • access: public
void setFstop (float $fstop)
  • float $fstop
setGmlPosition (line 1099)
  • access: public
void setGmlPosition (string $gmlPosition)
  • string $gmlPosition
setHeight (line 918)
  • access: public
void setHeight (int $height)
  • int $height
setId (line 774)
  • access: public
void setId (string $id)
  • string $id
setIdnum (line 900)
  • access: public
void setIdnum (string $idnum)
  • string $idnum
setImageType (line 981)
  • access: public
void setImageType (string $imageType)
  • string $imageType
setIso (line 1053)
  • access: public
void setIso (int $iso)
  • int $iso
setKeywords (line 810)
  • access: public
void setKeywords (string $keywords)
  • string $keywords
setLargeThumb (line 837)
  • access: public
void setLargeThumb (string $largeThumb)
  • string $largeThumb
setMediumThumb (line 828)
  • access: public
void setMediumThumb (string $mediumThumb)
  • string $mediumThumb
setNext (line 1117)
  • access: public
void setNext ({@link $next)
  • {@link $next: Picasa_Image}
setPrevious (line 1108)
  • access: public
void setPrevious ({@link $previous)
  • {@link $previous: Picasa_Image}
setSmallThumb (line 819)
  • access: public
void setSmallThumb (string $smallThumb)
  • string $smallThumb
setTags (line 954)
  • access: public
void setTags (string $tags)
  • string $tags
setThumbHeightMap (line 855)
  • access: public
void setThumbHeightMap (array $thumbHeightMap)
  • array $thumbHeightMap
setThumbnails (line 864)
  • access: public
void setThumbnails (array $thumbnails)
  • array $thumbnails
setThumbUrlMap (line 846)
  • access: public
void setThumbUrlMap (array $thumbUrlMap)
  • array $thumbUrlMap
setTimestamp (line 1090)
  • access: public
void setTimestamp (string $timestamp)
  • string $timestamp
setTimeTaken (line 1062)
  • access: public
void setTimeTaken (string $timeTaken)
  • string $timeTaken
setTitle (line 783)
  • access: public
void setTitle (string $title)
  • string $title
setUpdated (line 792)
  • access: public
void setUpdated (string $updated)
  • string $updated
setVersion (line 1071)
  • access: public
void setVersion (int $version)
  • int $version
setWeblink (line 1126)
  • access: public
void setWeblink (string $weblink)
  • string $weblink
setWidth (line 909)
  • access: public
void setWidth (int $width)
  • int $width
__toString (line 1389)

Constructs a textual representation of the current instantiation.

  • access: public
string __toString ()

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