[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/vendor/lcobucci/jwt/src/Claim/ -> GreaterOrEqualsTo.php (source)

   1  <?php
   2  /**
   3   * This file is part of Lcobucci\JWT, a simple library to handle JWT and JWS
   4   *
   5   * @license http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
   6   */
   7  
   8  namespace Lcobucci\JWT\Claim;
   9  
  10  use Lcobucci\JWT\Claim;
  11  use Lcobucci\JWT\ValidationData;
  12  
  13  /**
  14   * Validatable claim that checks if value is greater or equals the given data
  15   *
  16   * @deprecated This class will be removed on v4
  17   *
  18   * @author Luís Otávio Cobucci Oblonczyk <[email protected]>
  19   * @since 2.0.0
  20   */
  21  class GreaterOrEqualsTo extends Basic implements Claim, Validatable
  22  {
  23      /**
  24       * {@inheritdoc}
  25       */
  26      public function validate(ValidationData $data)
  27      {
  28          if ($data->has($this->getName())) {
  29              return $this->getValue() >= $data->get($this->getName());
  30          }
  31  
  32          return true;
  33      }
  34  }


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