[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/administrator/components/com_privacy/src/Export/ -> Item.php (source)

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Administrator
   5   * @subpackage  com_privacy
   6   *
   7   * @copyright   (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
   8   * @license     GNU General Public License version 2 or later; see LICENSE.txt
   9   */
  10  
  11  namespace Joomla\Component\Privacy\Administrator\Export;
  12  
  13  // phpcs:disable PSR1.Files.SideEffects
  14  \defined('_JEXEC') or die;
  15  // phpcs:enable PSR1.Files.SideEffects
  16  
  17  /**
  18   * Data object representing a single item within a domain.
  19   *
  20   * An item is typically a single row from a database table.
  21   *
  22   * @since  3.9.0
  23   */
  24  class Item
  25  {
  26      /**
  27       * The primary identifier of this item, typically the primary key for a database row.
  28       *
  29       * @var    integer
  30       * @since  3.9.0
  31       */
  32      public $id;
  33  
  34      /**
  35       * The fields belonging to this item
  36       *
  37       * @var    Field[]
  38       * @since  3.9.0
  39       */
  40      protected $fields = [];
  41  
  42      /**
  43       * Add a field to the item
  44       *
  45       * @param   Field  $field  The field to add
  46       *
  47       * @return  void
  48       *
  49       * @since   3.9.0
  50       */
  51      public function addField(Field $field)
  52      {
  53          $this->fields[] = $field;
  54      }
  55  
  56      /**
  57       * Get the item's fields
  58       *
  59       * @return  Field[]
  60       *
  61       * @since   3.9.0
  62       */
  63      public function getFields()
  64      {
  65          return $this->fields;
  66      }
  67  }


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