[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/src/Document/Feed/ -> FeedItem.php (source)

   1  <?php
   2  
   3  /**
   4   * Joomla! Content Management System
   5   *
   6   * @copyright  (C) 2017 Open Source Matters, Inc. <https://www.joomla.org>
   7   * @license    GNU General Public License version 2 or later; see LICENSE.txt
   8   */
   9  
  10  namespace Joomla\CMS\Document\Feed;
  11  
  12  // phpcs:disable PSR1.Files.SideEffects
  13  \defined('JPATH_PLATFORM') or die;
  14  // phpcs:enable PSR1.Files.SideEffects
  15  
  16  /**
  17   * Data object representing a feed item
  18   *
  19   * @since  1.7.0
  20   */
  21  class FeedItem
  22  {
  23      /**
  24       * Title item element
  25       *
  26       * required
  27       *
  28       * @var    string
  29       * @since  1.7.0
  30       */
  31      public $title;
  32  
  33      /**
  34       * Link item element
  35       *
  36       * required
  37       *
  38       * @var    string
  39       * @since  1.7.0
  40       */
  41      public $link;
  42  
  43      /**
  44       * Description item element
  45       *
  46       * required
  47       *
  48       * @var    string
  49       * @since  1.7.0
  50       */
  51      public $description;
  52  
  53      /**
  54       * Author item element
  55       *
  56       * optional
  57       *
  58       * @var    string
  59       * @since  1.7.0
  60       */
  61      public $author;
  62  
  63      /**
  64       * Author email element
  65       *
  66       * optional
  67       *
  68       * @var    string
  69       * @since  1.7.0
  70       */
  71      public $authorEmail;
  72  
  73      /**
  74       * Category element
  75       *
  76       * optional
  77       *
  78       * @var    array or string
  79       * @since  1.7.0
  80       */
  81      public $category;
  82  
  83      /**
  84       * Comments element
  85       *
  86       * optional
  87       *
  88       * @var    string
  89       * @since  1.7.0
  90       */
  91      public $comments;
  92  
  93      /**
  94       * Enclosure element
  95       *
  96       * @var    FeedEnclosure
  97       * @since  1.7.0
  98       */
  99      public $enclosure = null;
 100  
 101      /**
 102       * Guid element
 103       *
 104       * optional
 105       *
 106       * @var    string
 107       * @since  1.7.0
 108       */
 109      public $guid;
 110  
 111      /**
 112       * Published date
 113       *
 114       * optional
 115       *
 116       * May be in one of the following formats:
 117       *
 118       * RFC 822:
 119       * "Mon, 20 Jan 03 18:05:41 +0400"
 120       * "20 Jan 03 18:05:41 +0000"
 121       *
 122       * ISO 8601:
 123       * "2003-01-20T18:05:41+04:00"
 124       *
 125       * Unix:
 126       * 1043082341
 127       *
 128       * @var    string
 129       * @since  1.7.0
 130       */
 131      public $date;
 132  
 133      /**
 134       * Source element
 135       *
 136       * optional
 137       *
 138       * @var    string
 139       * @since  1.7.0
 140       */
 141      public $source;
 142  
 143      /**
 144       * Set the FeedEnclosure for this item
 145       *
 146       * @param   FeedEnclosure  $enclosure  The FeedEnclosure to add to the feed.
 147       *
 148       * @return  FeedItem instance of $this to allow chaining
 149       *
 150       * @since   1.7.0
 151       */
 152      public function setEnclosure(FeedEnclosure $enclosure)
 153      {
 154          $this->enclosure = $enclosure;
 155  
 156          return $this;
 157      }
 158  }


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer