[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/vendor/tobscure/json-api/src/Exception/ -> InvalidParameterException.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\Exception;
  13  
  14  use Exception;
  15  
  16  class InvalidParameterException extends Exception
  17  {
  18      /**
  19       * @var string The parameter that caused this exception.
  20       */
  21      private $invalidParameter;
  22  
  23      /**
  24       * {@inheritdoc}
  25       *
  26       * @param string $invalidParameter The parameter that caused this exception.
  27       */
  28      public function __construct($message = '', $code = 0, $previous = null, $invalidParameter = '')
  29      {
  30          parent::__construct($message, $code, $previous);
  31  
  32          $this->invalidParameter = $invalidParameter;
  33      }
  34  
  35      /**
  36       * @return string The parameter that caused this exception.
  37       */
  38      public function getInvalidParameter()
  39      {
  40          return $this->invalidParameter;
  41      }
  42  }


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