diff --git a/src/Subelements/Image.php b/src/Subelements/Image.php index a304483..6f70765 100644 --- a/src/Subelements/Image.php +++ b/src/Subelements/Image.php @@ -2,9 +2,9 @@ namespace Thepixeldeveloper\Sitemap\Subelements; -use Thepixeldeveloper\Sitemap\AppendAttributeInterface; -use Thepixeldeveloper\Sitemap\OutputInterface; use XMLWriter; +use Thepixeldeveloper\Sitemap\OutputInterface; +use Thepixeldeveloper\Sitemap\AppendAttributeInterface; /** * Class Image diff --git a/src/Subelements/Link.php b/src/Subelements/Link.php index 202e056..a684912 100644 --- a/src/Subelements/Link.php +++ b/src/Subelements/Link.php @@ -2,9 +2,9 @@ namespace Thepixeldeveloper\Sitemap\Subelements; -use Thepixeldeveloper\Sitemap\AppendAttributeInterface; -use Thepixeldeveloper\Sitemap\OutputInterface; use XMLWriter; +use Thepixeldeveloper\Sitemap\OutputInterface; +use Thepixeldeveloper\Sitemap\AppendAttributeInterface; /** * Class Link diff --git a/src/Subelements/Mobile.php b/src/Subelements/Mobile.php index 8c7686c..f394816 100644 --- a/src/Subelements/Mobile.php +++ b/src/Subelements/Mobile.php @@ -2,9 +2,9 @@ namespace Thepixeldeveloper\Sitemap\Subelements; -use Thepixeldeveloper\Sitemap\AppendAttributeInterface; -use Thepixeldeveloper\Sitemap\OutputInterface; use XMLWriter; +use Thepixeldeveloper\Sitemap\OutputInterface; +use Thepixeldeveloper\Sitemap\AppendAttributeInterface; /** * Class Mobile diff --git a/src/Subelements/News.php b/src/Subelements/News.php index 3ca5018..0e208d1 100644 --- a/src/Subelements/News.php +++ b/src/Subelements/News.php @@ -2,9 +2,9 @@ namespace Thepixeldeveloper\Sitemap\Subelements; -use Thepixeldeveloper\Sitemap\AppendAttributeInterface; -use Thepixeldeveloper\Sitemap\OutputInterface; use XMLWriter; +use Thepixeldeveloper\Sitemap\OutputInterface; +use Thepixeldeveloper\Sitemap\AppendAttributeInterface; /** * Class Image diff --git a/src/Subelements/Video.php b/src/Subelements/Video.php index 56f7bca..e55e3f9 100644 --- a/src/Subelements/Video.php +++ b/src/Subelements/Video.php @@ -2,9 +2,9 @@ namespace Thepixeldeveloper\Sitemap\Subelements; -use Thepixeldeveloper\Sitemap\AppendAttributeInterface; -use Thepixeldeveloper\Sitemap\OutputInterface; use XMLWriter; +use Thepixeldeveloper\Sitemap\OutputInterface; +use Thepixeldeveloper\Sitemap\AppendAttributeInterface; /** * Class Video @@ -79,66 +79,90 @@ class Video implements OutputInterface, AppendAttributeInterface protected $requiresSubscription; /** - * @var + * The price to download or view the video in ISO 4217 format. + * + * @link http://en.wikipedia.org/wiki/ISO_4217 + * + * @var string */ protected $price; /** - * @var + * Link to gallery of which this video appears in. + * + * @var string */ protected $galleryLoc; /** - * @var + * A space-delimited list of countries where the video may or may not be played. + * + * @var string */ protected $restriction; /** + * A tag associated with the video. + * * @var array */ protected $tags = []; /** - * @var + * The video's category. For example, cooking. + * + * @var string */ protected $category; /** - * @var + * No if the video should be available only to users with SafeSearch turned off. + * + * @var string */ protected $familyFriendly; /** - * @var + * The date the video was first published, in W3C format. + * + * @var string */ protected $publicationDate; /** - * @var + * The number of times the video has been viewed. + * + * @var integer */ protected $viewCount; /** - * @var + * The video uploader's name. Only one is allowed per video. + * + * @var string */ protected $uploader; /** - * @var + * The rating of the video. Allowed values are float numbers in the range 0.0 to 5.0. + * + * @var float */ protected $rating; /** - * @var + * The date after which the video will no longer be available, in W3C format. + * + * @var string */ protected $expirationDate; /** * Video constructor. * - * @param $thumbnailLoc - * @param $title - * @param $description + * @param string $thumbnailLoc + * @param string $title + * @param string $description */ public function __construct($thumbnailLoc, $title, $description) { @@ -148,7 +172,9 @@ public function __construct($thumbnailLoc, $title, $description) } /** - * @return mixed + * URL pointing to the player file (normally a SWF). + * + * @return string */ public function getPlayerLoc() { @@ -156,9 +182,11 @@ public function getPlayerLoc() } /** - * @param mixed $playerLoc + * URL pointing to the player file (normally a SWF). + * + * @param string $playerLoc * - * @return Video + * @return $this */ public function setPlayerLoc($playerLoc) { @@ -167,6 +195,9 @@ public function setPlayerLoc($playerLoc) return $this; } + /** + * {@inheritdoc} + */ public function generateXML(XMLWriter $XMLWriter) { $XMLWriter->startElement('video:video'); @@ -201,7 +232,9 @@ public function generateXML(XMLWriter $XMLWriter) } /** - * @return mixed + * URL pointing to an image thumbnail. + * + * @return string */ public function getThumbnailLoc() { @@ -209,7 +242,9 @@ public function getThumbnailLoc() } /** - * @return mixed + * Title of the video, max 100 characters. + * + * @return string */ public function getTitle() { @@ -217,7 +252,9 @@ public function getTitle() } /** - * @return mixed + * Description of the video, max 2048 characters. + * + * @return string */ public function getDescription() { @@ -225,9 +262,7 @@ public function getDescription() } /** - * @param XMLWriter $XMLWriter - * @param string $name - * @param string $value + * {@inheritdoc} */ protected function optionalWriteElement(XMLWriter $XMLWriter, $name, $value) { @@ -237,7 +272,9 @@ protected function optionalWriteElement(XMLWriter $XMLWriter, $name, $value) } /** - * @return mixed + * URL pointing to the actual media file (mp4). + * + * @return string */ public function getContentLoc() { @@ -245,9 +282,11 @@ public function getContentLoc() } /** - * @param mixed $contentLoc + * URL pointing to the actual media file (mp4). * - * @return Video + * @param string $contentLoc + * + * @return $this */ public function setContentLoc($contentLoc) { @@ -257,7 +296,9 @@ public function setContentLoc($contentLoc) } /** - * @return mixed + * Duration of the video in seconds. + * + * @return integer */ public function getDuration() { @@ -265,9 +306,11 @@ public function getDuration() } /** - * @param mixed $duration + * Duration of the video in seconds. + * + * @param integer $duration * - * @return Video + * @return $this */ public function setDuration($duration) { @@ -277,7 +320,9 @@ public function setDuration($duration) } /** - * @return mixed + * The date after which the video will no longer be available, in W3C format. + * + * @return string */ public function getExpirationDate() { @@ -285,9 +330,11 @@ public function getExpirationDate() } /** - * @param mixed $expirationDate + * The date after which the video will no longer be available, in W3C format. + * + * @param string $expirationDate * - * @return Video + * @return $this */ public function setExpirationDate($expirationDate) { @@ -297,7 +344,9 @@ public function setExpirationDate($expirationDate) } /** - * @return mixed + * The rating of the video. Allowed values are float numbers in the range 0.0 to 5.0. + * + * @return float */ public function getRating() { @@ -305,9 +354,11 @@ public function getRating() } /** - * @param mixed $rating + * The rating of the video. Allowed values are float numbers in the range 0.0 to 5.0. * - * @return Video + * @param float $rating + * + * @return $this */ public function setRating($rating) { @@ -317,7 +368,9 @@ public function setRating($rating) } /** - * @return mixed + * The number of times the video has been viewed. + * + * @return integer */ public function getViewCount() { @@ -325,9 +378,11 @@ public function getViewCount() } /** - * @param mixed $viewCount + * The number of times the video has been viewed. + * + * @param integer $viewCount * - * @return Video + * @return $this */ public function setViewCount($viewCount) { @@ -337,7 +392,9 @@ public function setViewCount($viewCount) } /** - * @return mixed + * The date the video was first published, in W3C format. + * + * @return string */ public function getPublicationDate() { @@ -345,9 +402,11 @@ public function getPublicationDate() } /** - * @param mixed $publicationDate + * The date the video was first published, in W3C format. + * + * @param string $publicationDate * - * @return Video + * @return $this */ public function setPublicationDate($publicationDate) { @@ -357,7 +416,9 @@ public function setPublicationDate($publicationDate) } /** - * @return mixed + * No if the video should be available only to users with SafeSearch turned off. + * + * @return string */ public function getFamilyFriendly() { @@ -365,9 +426,11 @@ public function getFamilyFriendly() } /** - * @param mixed $familyFriendly + * No if the video should be available only to users with SafeSearch turned off. + * + * @param string $familyFriendly * - * @return Video + * @return $this */ public function setFamilyFriendly($familyFriendly) { @@ -377,6 +440,8 @@ public function setFamilyFriendly($familyFriendly) } /** + * A tag associated with the video. + * * @return array */ public function getTags() @@ -385,9 +450,11 @@ public function getTags() } /** + * A tag associated with the video. + * * @param array $tags * - * @return Video + * @return $this */ public function setTags($tags) { @@ -397,7 +464,9 @@ public function setTags($tags) } /** - * @return mixed + * The video's category. For example, cooking. + * + * @return string */ public function getCategory() { @@ -405,9 +474,11 @@ public function getCategory() } /** - * @param mixed $category + * The video's category. For example, cooking. * - * @return Video + * @param string $category + * + * @return $this */ public function setCategory($category) { @@ -417,7 +488,9 @@ public function setCategory($category) } /** - * @return mixed + * A space-delimited list of countries where the video may or may not be played. + * + * @return string */ public function getRestriction() { @@ -425,9 +498,11 @@ public function getRestriction() } /** - * @param mixed $restriction + * A space-delimited list of countries where the video may or may not be played. + * + * @param string $restriction * - * @return Video + * @return $this */ public function setRestriction($restriction) { @@ -437,7 +512,9 @@ public function setRestriction($restriction) } /** - * @return mixed + * Link to gallery of which this video appears in. + * + * @return string */ public function getGalleryLoc() { @@ -445,9 +522,11 @@ public function getGalleryLoc() } /** - * @param mixed $galleryLoc + * Link to gallery of which this video appears in. + * + * @param string $galleryLoc * - * @return Video + * @return $this */ public function setGalleryLoc($galleryLoc) { @@ -457,7 +536,9 @@ public function setGalleryLoc($galleryLoc) } /** - * @return mixed + * The price to download or view the video in ISO 4217 format. + * + * @return string */ public function getPrice() { @@ -465,9 +546,11 @@ public function getPrice() } /** - * @param mixed $price + * The price to download or view the video in ISO 4217 format. + * + * @param string $price * - * @return Video + * @return $this */ public function setPrice($price) { @@ -477,7 +560,9 @@ public function setPrice($price) } /** - * @return mixed + * Does the video require a subscription? + * + * @return boolean */ public function getRequiresSubscription() { @@ -485,9 +570,11 @@ public function getRequiresSubscription() } /** - * @param mixed $requiresSubscription + * Does the video require a subscription? * - * @return Video + * @param boolean $requiresSubscription + * + * @return $this */ public function setRequiresSubscription($requiresSubscription) { @@ -497,7 +584,9 @@ public function setRequiresSubscription($requiresSubscription) } /** - * @return mixed + * The video uploader's name. Only one is allowed per video. + * + * @return string */ public function getUploader() { @@ -505,9 +594,11 @@ public function getUploader() } /** - * @param mixed $uploader + * The video uploader's name. Only one is allowed per video. + * + * @param string $uploader * - * @return Video + * @return $this */ public function setUploader($uploader) { @@ -517,7 +608,11 @@ public function setUploader($uploader) } /** - * @return mixed + * String of space delimited platform values. + * + * Allowed values are web, mobile, and tv. + * + * @return string */ public function getPlatform() { @@ -525,9 +620,13 @@ public function getPlatform() } /** - * @param mixed $platform + * String of space delimited platform values. + * + * Allowed values are web, mobile, and tv. * - * @return Video + * @param string $platform + * + * @return $this */ public function setPlatform($platform) { @@ -537,7 +636,9 @@ public function setPlatform($platform) } /** - * @return mixed + * Indicates whether the video is live. + * + * @return boolean */ public function getLive() { @@ -545,9 +646,11 @@ public function getLive() } /** - * @param mixed $live + * Indicates whether the video is live. + * + * @param boolean $live * - * @return Video + * @return $this */ public function setLive($live) { @@ -557,7 +660,7 @@ public function setLive($live) } /** - * @param XMLWriter $XMLWriter + * {@inheritdoc} */ public function appendAttributeToCollectionXML(XMLWriter $XMLWriter) {