[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/vendor/tobscure/json-api/src/ -> MetaTrait.php (source)

   1  <?php
   2  
   3  /*
   4   * This file is part of JSON-API.
   5   *
   6   * (c) Toby Zerner <[email protected]>
   7   *
   8   * For the full copyright and license information, please view the LICENSE
   9   * file that was distributed with this source code.
  10   */
  11  
  12  namespace Tobscure\JsonApi;
  13  
  14  trait MetaTrait
  15  {
  16      /**
  17       * The meta data array.
  18       *
  19       * @var array
  20       */
  21      protected $meta;
  22  
  23      /**
  24       * Get the meta.
  25       *
  26       * @return array
  27       */
  28      public function getMeta()
  29      {
  30          return $this->meta;
  31      }
  32  
  33      /**
  34       * Set the meta data array.
  35       *
  36       * @param array $meta
  37       *
  38       * @return $this
  39       */
  40      public function setMeta(array $meta)
  41      {
  42          $this->meta = $meta;
  43  
  44          return $this;
  45      }
  46  
  47      /**
  48       * Add meta data.
  49       *
  50       * @param string $key
  51       * @param string $value
  52       *
  53       * @return $this
  54       */
  55      public function addMeta($key, $value)
  56      {
  57          $this->meta[$key] = $value;
  58  
  59          return $this;
  60      }
  61  }


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