Spade

Mini Shell

Directory:~$ /home/lmsyaran/public_html/joomla4/
Upload File

[Home] [System Details] [Kill Me]
Current File:~$ /home/lmsyaran/public_html/joomla4/photo.php.tar

home/lmsyaran/public_html/libraries/joomla/google/data/picasa/photo.php000064400000016233151156323570022365
0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Google
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

use Joomla\Registry\Registry;

/**
 * Google Picasa data class for the Joomla Platform.
 *
 * @since       3.1.4
 * @deprecated  4.0  Use the `joomla/google` package via Composer instead
 */
class JGoogleDataPicasaPhoto extends JGoogleData
{
	/**
	 * @var    SimpleXMLElement  The photo's XML
	 * @since  3.1.4
	 */
	protected $xml;

	/**
	 * Constructor.
	 *
	 * @param   SimpleXMLElement  $xml      XML from Google
	 * @param   Registry          $options  Google options object
	 * @param   JGoogleAuth       $auth     Google data http client object
	 *
	 * @since   3.1.4
	 */
	public function __construct(SimpleXMLElement $xml, Registry $options =
null, JGoogleAuth $auth = null)
	{
		$this->xml = $xml;

		parent::__construct($options, $auth);

		if (isset($this->auth) &&
!$this->auth->getOption('scope'))
		{
			$this->auth->setOption('scope',
'https://picasaweb.google.com/data/');
		}
	}

	/**
	 * Method to delete a Picasa photo
	 *
	 * @param   mixed  $match  Check for most up to date photo
	 *
	 * @return  boolean  Success or failure.
	 *
	 * @since   3.1.4
	 * @throws  Exception
	 * @throws  RuntimeException
	 * @throws  UnexpectedValueException
	 */
	public function delete($match = '*')
	{
		if ($this->isAuthenticated())
		{
			$url = $this->getLink();

			if ($match === true)
			{
				$match = $this->xml->xpath('./@gd:etag');
				$match = $match[0];
			}

			try
			{
				$jdata = $this->query($url, null, array('GData-Version'
=> 2, 'If-Match' => $match), 'delete');
			}
			catch (Exception $e)
			{
				if (strpos($e->getMessage(), 'Error code 412 received
requesting data: Mismatch: etags') === 0)
				{
					throw new RuntimeException("Etag match failed: `$match`.",
$e->getCode(), $e);
				}

				throw $e;
			}

			if ($jdata->body != '')
			{
				throw new UnexpectedValueException("Unexpected data received from
Google: `{$jdata->body}`.");
			}

			$this->xml = null;

			return true;
		}
		else
		{
			return false;
		}
	}

	/**
	 * Method to get the photo link
	 *
	 * @param   string  $type  Type of link to return
	 *
	 * @return  string  Link or false on failure
	 *
	 * @since   3.1.4
	 */
	public function getLink($type = 'edit')
	{
		$links = $this->xml->link;

		foreach ($links as $link)
		{
			if ($link->attributes()->rel == $type)
			{
				return (string) $link->attributes()->href;
			}
		}

		return false;
	}

	/**
	 * Method to get the photo's URL
	 *
	 * @return  string  Link
	 *
	 * @since   3.1.4
	 */
	public function getUrl()
	{
		return (string)
$this->xml->children()->content->attributes()->src;
	}

	/**
	 * Method to get the photo's thumbnails
	 *
	 * @return  array  An array of thumbnails
	 *
	 * @since   3.1.4
	 */
	public function getThumbnails()
	{
		$thumbs = array();

		foreach ($this->xml->children('media',
true)->group->thumbnail as $item)
		{
			$url = (string) $item->attributes()->url;
			$width = (int) $item->attributes()->width;
			$height = (int) $item->attributes()->height;
			$thumbs[$width] = array('url' => $url, 'w' =>
$width, 'h' => $height);
		}

		return $thumbs;
	}

	/**
	 * Method to get the title of the photo
	 *
	 * @return  string  Photo title
	 *
	 * @since   3.1.4
	 */
	public function getTitle()
	{
		return (string) $this->xml->children()->title;
	}

	/**
	 * Method to get the summary of the photo
	 *
	 * @return  string  Photo description
	 *
	 * @since   3.1.4
	 */
	public function getSummary()
	{
		return (string) $this->xml->children()->summary;
	}

	/**
	 * Method to get the access level of the photo
	 *
	 * @return  string  Photo access level
	 *
	 * @since   3.1.4
	 */
	public function getAccess()
	{
		return (string) $this->xml->children('gphoto',
true)->access;
	}

	/**
	 * Method to get the time of the photo
	 *
	 * @return  double  Photo time
	 *
	 * @since   3.1.4
	 */
	public function getTime()
	{
		return (double) $this->xml->children('gphoto',
true)->timestamp / 1000;
	}

	/**
	 * Method to get the size of the photo
	 *
	 * @return  int  Photo size
	 *
	 * @since   3.1.4
	 */
	public function getSize()
	{
		return (int) $this->xml->children('gphoto',
true)->size;
	}

	/**
	 * Method to get the height of the photo
	 *
	 * @return  int  Photo height
	 *
	 * @since   3.1.4
	 */
	public function getHeight()
	{
		return (int) $this->xml->children('gphoto',
true)->height;
	}

	/**
	 * Method to get the width of the photo
	 *
	 * @return  int  Photo width
	 *
	 * @since   3.1.4
	 */
	public function getWidth()
	{
		return (int) $this->xml->children('gphoto',
true)->width;
	}

	/**
	 * Method to set the title of the photo
	 *
	 * @param   string  $title  New photo title
	 *
	 * @return  JGoogleDataPicasaPhoto  The object for method chaining
	 *
	 * @since   3.1.4
	 */
	public function setTitle($title)
	{
		$this->xml->children()->title = $title;

		return $this;
	}

	/**
	 * Method to set the summary of the photo
	 *
	 * @param   string  $summary  New photo description
	 *
	 * @return  JGoogleDataPicasaPhoto  The object for method chaining
	 *
	 * @since   3.1.4
	 */
	public function setSummary($summary)
	{
		$this->xml->children()->summary = $summary;

		return $this;
	}

	/**
	 * Method to set the access level of the photo
	 *
	 * @param   string  $access  New photo access level
	 *
	 * @return  JGoogleDataPicasaPhoto  The object for method chaining
	 *
	 * @since   3.1.4
	 */
	public function setAccess($access)
	{
		$this->xml->children('gphoto', true)->access =
$access;

		return $this;
	}

	/**
	 * Method to set the time of the photo
	 *
	 * @param   int  $time  New photo time
	 *
	 * @return  JGoogleDataPicasaPhoto  The object for method chaining
	 *
	 * @since   3.1.4
	 */
	public function setTime($time)
	{
		$this->xml->children('gphoto', true)->timestamp =
$time * 1000;

		return $this;
	}

	/**
	 * Method to modify a Picasa Photo
	 *
	 * @param   string  $match  Optional eTag matching parameter
	 *
	 * @return  mixed  Data from Google.
	 *
	 * @since   3.1.4
	 */
	public function save($match = '*')
	{
		if ($this->isAuthenticated())
		{
			$url = $this->getLink();

			if ($match === true)
			{
				$match = $this->xml->xpath('./@gd:etag');
				$match = $match[0];
			}

			try
			{
				$headers = array('GData-Version' => 2,
'Content-type' => 'application/atom+xml',
'If-Match' => $match);
				$jdata = $this->query($url, $this->xml->asXml(), $headers,
'put');
			}
			catch (Exception $e)
			{
				if (strpos($e->getMessage(), 'Error code 412 received
requesting data: Mismatch: etags') === 0)
				{
					throw new RuntimeException("Etag match failed: `$match`.",
$e->getCode(), $e);
				}

				throw $e;
			}

			$this->xml = $this->safeXml($jdata->body);

			return $this;
		}
		else
		{
			return false;
		}
	}

	/**
	 * Refresh photo data
	 *
	 * @return  mixed  Data from Google
	 *
	 * @since   3.1.4
	 */
	public function refresh()
	{
		if ($this->isAuthenticated())
		{
			$url = $this->getLink();
			$jdata = $this->query($url, null, array('GData-Version'
=> 2));
			$this->xml = $this->safeXml($jdata->body);

			return $this;
		}
		else
		{
			return false;
		}
	}
}
home/lmsyaran/public_html/j3/htaccess.back/joomla/facebook/photo.php000064400000016733151156753350021555
0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Facebook
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die();

/**
 * Facebook API Photo class for the Joomla Platform.
 *
 * @link        http://developers.facebook.com/docs/reference/api/photo/
 * @since       3.2.0
 * @deprecated  4.0  Use the `joomla/facebook` package via Composer instead
 */
class JFacebookPhoto extends JFacebookObject
{
	/**
	 * Method to get a photo. Requires authentication and user_photos or
friends_photos permission for private photos.
	 *
	 * @param   string  $photo  The photo id.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getPhoto($photo)
	{
		return $this->get($photo);
	}

	/**
	 * Method to get a photo's comments. Requires authentication and
user_photos or friends_photos permission for private photos.
	 *
	 * @param   string   $photo   The photo id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getComments($photo, $limit = 0, $offset = 0, $until =
null, $since = null)
	{
		return $this->getConnection($photo, 'comments',
'', $limit, $offset, $until, $since);
	}

	/**
	 * Method to comment on a photo. Requires authentication and
publish_stream permission, user_photos or friends_photos permission for
private photos.
	 *
	 * @param   string  $photo    The photo id.
	 * @param   string  $message  The comment's text.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createComment($photo, $message)
	{
		// Set POST request parameters.
		$data['message'] = $message;

		return $this->createConnection($photo, 'comments', $data);
	}

	/**
	 * Method to delete a comment. Requires authentication and publish_stream
permission, user_photos or friends_photos permission for private photos.
	 *
	 * @param   string  $comment  The comment's id.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteComment($comment)
	{
		return $this->deleteConnection($comment);
	}

	/**
	 * Method to get photo's likes. Requires authentication and
user_photos or friends_photos permission for private photos.
	 *
	 * @param   string   $photo   The photo id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getLikes($photo, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($photo, 'likes', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to like a photo. Requires authentication and publish_stream
permission, user_photos or friends_photos permission for private photos.
	 *
	 * @param   string  $photo  The photo id.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function createLike($photo)
	{
		return $this->createConnection($photo, 'likes');
	}

	/**
	 * Method to unlike a photo. Requires authentication and publish_stream
permission, user_photos or friends_photos permission for private photos.
	 *
	 * @param   string  $photo  The photo id.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteLike($photo)
	{
		return $this->deleteConnection($photo, 'likes');
	}

	/**
	 * Method to get the Users tagged in the photo. Requires authentication
and user_photos or friends_photos permission for private photos.
	 *
	 * @param   string   $photo   The photo id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getTags($photo, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($photo, 'tags', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to tag one or more Users in a photo. $to or $tagText required.
	 * Requires authentication and publish_stream permission, user_photos
permission for private photos.
	 *
	 * @param   string   $photo    The photo id.
	 * @param   mixed    $to       ID of the User or an array of Users to tag
in the photo: [{"id":"1234"},
{"id":"12345"}].
	 * @param   string   $tagText  A text string to tag.
	 * @param   integer  $x        x coordinate of tag, as a percentage offset
from the left edge of the picture.
	 * @param   integer  $y        y coordinate of tag, as a percentage offset
from the top edge of the picture.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function createTag($photo, $to = null, $tagText = null, $x = null,
$y = null)
	{
		// Set POST request parameters.
		if (is_array($to))
		{
			$data['tags'] = $to;
		}
		else
		{
			$data['to'] = $to;
		}

		if ($tagText)
		{
			$data['tag_text'] = $tagText;
		}

		if ($x)
		{
			$data['x'] = $x;
		}

		if ($y)
		{
			$data['y'] = $y;
		}

		return $this->createConnection($photo, 'tags', $data);
	}

	/**
	 * Method to update the position of the tag for a particular Users in a
photo.
	 * Requires authentication and publish_stream permission, user_photos
permission for private photos.
	 *
	 * @param   string   $photo  The photo id.
	 * @param   string   $to     ID of the User to update tag in the photo.
	 * @param   integer  $x      x coordinate of tag, as a percentage offset
from the left edge of the picture.
	 * @param   integer  $y      y coordinate of tag, as a percentage offset
from the top edge of the picture.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function updateTag($photo, $to, $x = null, $y = null)
	{
		// Set POST request parameters.
		$data['to'] = $to;

		if ($x)
		{
			$data['x'] = $x;
		}

		if ($y)
		{
			$data['y'] = $y;
		}

		return $this->createConnection($photo, 'tags', $data);
	}

	/**
	 * Method to get the album-sized view of the photo. Requires
authentication and user_photos or friends_photos permission for private
photos.
	 *
	 * @param   string   $photo     The photo id.
	 * @param   boolean  $redirect  If false this will return the URL of the
picture without a 302 redirect.
	 *
	 * @return  string  URL of the picture.
	 *
	 * @since   3.2.0
	 */
	public function getPicture($photo, $redirect = true)
	{
		$extra_fields = '';

		if ($redirect == false)
		{
			$extra_fields = '?redirect=false';
		}

		return $this->getConnection($photo, 'picture',
$extra_fields);
	}
}
home/lmsyaran/public_html/libraries/joomla/facebook/photo.php000064400000016733151157645550020524
0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Facebook
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die();

/**
 * Facebook API Photo class for the Joomla Platform.
 *
 * @link        http://developers.facebook.com/docs/reference/api/photo/
 * @since       3.2.0
 * @deprecated  4.0  Use the `joomla/facebook` package via Composer instead
 */
class JFacebookPhoto extends JFacebookObject
{
	/**
	 * Method to get a photo. Requires authentication and user_photos or
friends_photos permission for private photos.
	 *
	 * @param   string  $photo  The photo id.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getPhoto($photo)
	{
		return $this->get($photo);
	}

	/**
	 * Method to get a photo's comments. Requires authentication and
user_photos or friends_photos permission for private photos.
	 *
	 * @param   string   $photo   The photo id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getComments($photo, $limit = 0, $offset = 0, $until =
null, $since = null)
	{
		return $this->getConnection($photo, 'comments',
'', $limit, $offset, $until, $since);
	}

	/**
	 * Method to comment on a photo. Requires authentication and
publish_stream permission, user_photos or friends_photos permission for
private photos.
	 *
	 * @param   string  $photo    The photo id.
	 * @param   string  $message  The comment's text.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createComment($photo, $message)
	{
		// Set POST request parameters.
		$data['message'] = $message;

		return $this->createConnection($photo, 'comments', $data);
	}

	/**
	 * Method to delete a comment. Requires authentication and publish_stream
permission, user_photos or friends_photos permission for private photos.
	 *
	 * @param   string  $comment  The comment's id.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteComment($comment)
	{
		return $this->deleteConnection($comment);
	}

	/**
	 * Method to get photo's likes. Requires authentication and
user_photos or friends_photos permission for private photos.
	 *
	 * @param   string   $photo   The photo id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getLikes($photo, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($photo, 'likes', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to like a photo. Requires authentication and publish_stream
permission, user_photos or friends_photos permission for private photos.
	 *
	 * @param   string  $photo  The photo id.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function createLike($photo)
	{
		return $this->createConnection($photo, 'likes');
	}

	/**
	 * Method to unlike a photo. Requires authentication and publish_stream
permission, user_photos or friends_photos permission for private photos.
	 *
	 * @param   string  $photo  The photo id.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteLike($photo)
	{
		return $this->deleteConnection($photo, 'likes');
	}

	/**
	 * Method to get the Users tagged in the photo. Requires authentication
and user_photos or friends_photos permission for private photos.
	 *
	 * @param   string   $photo   The photo id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getTags($photo, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($photo, 'tags', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to tag one or more Users in a photo. $to or $tagText required.
	 * Requires authentication and publish_stream permission, user_photos
permission for private photos.
	 *
	 * @param   string   $photo    The photo id.
	 * @param   mixed    $to       ID of the User or an array of Users to tag
in the photo: [{"id":"1234"},
{"id":"12345"}].
	 * @param   string   $tagText  A text string to tag.
	 * @param   integer  $x        x coordinate of tag, as a percentage offset
from the left edge of the picture.
	 * @param   integer  $y        y coordinate of tag, as a percentage offset
from the top edge of the picture.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function createTag($photo, $to = null, $tagText = null, $x = null,
$y = null)
	{
		// Set POST request parameters.
		if (is_array($to))
		{
			$data['tags'] = $to;
		}
		else
		{
			$data['to'] = $to;
		}

		if ($tagText)
		{
			$data['tag_text'] = $tagText;
		}

		if ($x)
		{
			$data['x'] = $x;
		}

		if ($y)
		{
			$data['y'] = $y;
		}

		return $this->createConnection($photo, 'tags', $data);
	}

	/**
	 * Method to update the position of the tag for a particular Users in a
photo.
	 * Requires authentication and publish_stream permission, user_photos
permission for private photos.
	 *
	 * @param   string   $photo  The photo id.
	 * @param   string   $to     ID of the User to update tag in the photo.
	 * @param   integer  $x      x coordinate of tag, as a percentage offset
from the left edge of the picture.
	 * @param   integer  $y      y coordinate of tag, as a percentage offset
from the top edge of the picture.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function updateTag($photo, $to, $x = null, $y = null)
	{
		// Set POST request parameters.
		$data['to'] = $to;

		if ($x)
		{
			$data['x'] = $x;
		}

		if ($y)
		{
			$data['y'] = $y;
		}

		return $this->createConnection($photo, 'tags', $data);
	}

	/**
	 * Method to get the album-sized view of the photo. Requires
authentication and user_photos or friends_photos permission for private
photos.
	 *
	 * @param   string   $photo     The photo id.
	 * @param   boolean  $redirect  If false this will return the URL of the
picture without a 302 redirect.
	 *
	 * @return  string  URL of the picture.
	 *
	 * @since   3.2.0
	 */
	public function getPicture($photo, $redirect = true)
	{
		$extra_fields = '';

		if ($redirect == false)
		{
			$extra_fields = '?redirect=false';
		}

		return $this->getConnection($photo, 'picture',
$extra_fields);
	}
}
home/lmsyaran/public_html/j3/libraries/joomla/facebook/photo.php000064400000016733151163101640021020
0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Facebook
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die();

/**
 * Facebook API Photo class for the Joomla Platform.
 *
 * @link        http://developers.facebook.com/docs/reference/api/photo/
 * @since       3.2.0
 * @deprecated  4.0  Use the `joomla/facebook` package via Composer instead
 */
class JFacebookPhoto extends JFacebookObject
{
	/**
	 * Method to get a photo. Requires authentication and user_photos or
friends_photos permission for private photos.
	 *
	 * @param   string  $photo  The photo id.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getPhoto($photo)
	{
		return $this->get($photo);
	}

	/**
	 * Method to get a photo's comments. Requires authentication and
user_photos or friends_photos permission for private photos.
	 *
	 * @param   string   $photo   The photo id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getComments($photo, $limit = 0, $offset = 0, $until =
null, $since = null)
	{
		return $this->getConnection($photo, 'comments',
'', $limit, $offset, $until, $since);
	}

	/**
	 * Method to comment on a photo. Requires authentication and
publish_stream permission, user_photos or friends_photos permission for
private photos.
	 *
	 * @param   string  $photo    The photo id.
	 * @param   string  $message  The comment's text.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createComment($photo, $message)
	{
		// Set POST request parameters.
		$data['message'] = $message;

		return $this->createConnection($photo, 'comments', $data);
	}

	/**
	 * Method to delete a comment. Requires authentication and publish_stream
permission, user_photos or friends_photos permission for private photos.
	 *
	 * @param   string  $comment  The comment's id.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteComment($comment)
	{
		return $this->deleteConnection($comment);
	}

	/**
	 * Method to get photo's likes. Requires authentication and
user_photos or friends_photos permission for private photos.
	 *
	 * @param   string   $photo   The photo id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getLikes($photo, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($photo, 'likes', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to like a photo. Requires authentication and publish_stream
permission, user_photos or friends_photos permission for private photos.
	 *
	 * @param   string  $photo  The photo id.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function createLike($photo)
	{
		return $this->createConnection($photo, 'likes');
	}

	/**
	 * Method to unlike a photo. Requires authentication and publish_stream
permission, user_photos or friends_photos permission for private photos.
	 *
	 * @param   string  $photo  The photo id.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteLike($photo)
	{
		return $this->deleteConnection($photo, 'likes');
	}

	/**
	 * Method to get the Users tagged in the photo. Requires authentication
and user_photos or friends_photos permission for private photos.
	 *
	 * @param   string   $photo   The photo id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getTags($photo, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($photo, 'tags', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to tag one or more Users in a photo. $to or $tagText required.
	 * Requires authentication and publish_stream permission, user_photos
permission for private photos.
	 *
	 * @param   string   $photo    The photo id.
	 * @param   mixed    $to       ID of the User or an array of Users to tag
in the photo: [{"id":"1234"},
{"id":"12345"}].
	 * @param   string   $tagText  A text string to tag.
	 * @param   integer  $x        x coordinate of tag, as a percentage offset
from the left edge of the picture.
	 * @param   integer  $y        y coordinate of tag, as a percentage offset
from the top edge of the picture.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function createTag($photo, $to = null, $tagText = null, $x = null,
$y = null)
	{
		// Set POST request parameters.
		if (is_array($to))
		{
			$data['tags'] = $to;
		}
		else
		{
			$data['to'] = $to;
		}

		if ($tagText)
		{
			$data['tag_text'] = $tagText;
		}

		if ($x)
		{
			$data['x'] = $x;
		}

		if ($y)
		{
			$data['y'] = $y;
		}

		return $this->createConnection($photo, 'tags', $data);
	}

	/**
	 * Method to update the position of the tag for a particular Users in a
photo.
	 * Requires authentication and publish_stream permission, user_photos
permission for private photos.
	 *
	 * @param   string   $photo  The photo id.
	 * @param   string   $to     ID of the User to update tag in the photo.
	 * @param   integer  $x      x coordinate of tag, as a percentage offset
from the left edge of the picture.
	 * @param   integer  $y      y coordinate of tag, as a percentage offset
from the top edge of the picture.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function updateTag($photo, $to, $x = null, $y = null)
	{
		// Set POST request parameters.
		$data['to'] = $to;

		if ($x)
		{
			$data['x'] = $x;
		}

		if ($y)
		{
			$data['y'] = $y;
		}

		return $this->createConnection($photo, 'tags', $data);
	}

	/**
	 * Method to get the album-sized view of the photo. Requires
authentication and user_photos or friends_photos permission for private
photos.
	 *
	 * @param   string   $photo     The photo id.
	 * @param   boolean  $redirect  If false this will return the URL of the
picture without a 302 redirect.
	 *
	 * @return  string  URL of the picture.
	 *
	 * @since   3.2.0
	 */
	public function getPicture($photo, $redirect = true)
	{
		$extra_fields = '';

		if ($redirect == false)
		{
			$extra_fields = '?redirect=false';
		}

		return $this->getConnection($photo, 'picture',
$extra_fields);
	}
}