Source for file link.php

Documentation is available at link.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Platform
  4.  * @subpackage  Feed
  5.  *
  6.  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
  7.  * @license     GNU General Public License version 2 or later; see LICENSE
  8.  */
  9.  
  10. defined('JPATH_PLATFORM'or die;
  11.  
  12. /**
  13.  * Feed Link class.
  14.  *
  15.  * @package     Joomla.Platform
  16.  * @subpackage  Feed
  17.  * @since       12.3
  18.  */
  19. class JFeedLink
  20. {
  21.     /**
  22.      * The URI to the linked resource.
  23.      *
  24.      * @var    string 
  25.      * @since  12.3
  26.      */
  27.     public $uri;
  28.  
  29.     /**
  30.      * The relationship between the feed and the linked resource.
  31.      *
  32.      * @var    string 
  33.      * @since  12.3
  34.      */
  35.     public $relation;
  36.  
  37.     /**
  38.      * The resource type.
  39.      *
  40.      * @var    string 
  41.      * @since  12.3
  42.      */
  43.     public $type;
  44.  
  45.     /**
  46.      * The language of the resource found at the given URI.
  47.      *
  48.      * @var    string 
  49.      * @since  12.3
  50.      */
  51.     public $language;
  52.  
  53.     /**
  54.      * The title of the resource.
  55.      *
  56.      * @var    string 
  57.      * @since  12.3
  58.      */
  59.     public $title;
  60.  
  61.     /**
  62.      * The length of the resource in bytes.
  63.      *
  64.      * @var    integer 
  65.      * @since  12.3
  66.      */
  67.     public $length;
  68.  
  69.     /**
  70.      * Constructor.
  71.      *
  72.      * @param   string   $uri       The URI to the linked resource.
  73.      * @param   string   $relation  The relationship between the feed and the linked resource.
  74.      * @param   string   $type      The resource type.
  75.      * @param   string   $language  The language of the resource found at the given URI.
  76.      * @param   string   $title     The title of the resource.
  77.      * @param   integer  $length    The length of the resource in bytes.
  78.      *
  79.      * @since   12.3
  80.      * @throws  InvalidArgumentException
  81.      */
  82.     public function __construct($uri null$relation null$type null$language null$title null$length null)
  83.     {
  84.         $this->uri = $uri;
  85.         $this->relation = $relation;
  86.         $this->type = $type;
  87.         $this->language = $language;
  88.         $this->title = $title;
  89.  
  90.         // Validate the length input.
  91.         if (isset($length&& !is_numeric($length))
  92.         {
  93.             throw new InvalidArgumentException('Length must be numeric.');
  94.         }
  95.         $this->length = (int) $length;
  96.     }
  97. }

Documentation generated on Tue, 19 Nov 2013 15:07:09 +0100 by phpDocumentor 1.4.3