[ Index ]

PHP Cross Reference of phpBB-3.3.7-deutsch

title

Body

[close]

/vendor/s9e/text-formatter/src/Parser/AttributeFilters/ -> RegexpFilter.php (source)

   1  <?php
   2  
   3  /**
   4  * @package   s9e\TextFormatter
   5  * @copyright Copyright (c) 2010-2021 The s9e authors
   6  * @license   http://www.opensource.org/licenses/mit-license.php The MIT License
   7  */
   8  namespace s9e\TextFormatter\Parser\AttributeFilters;
   9  
  10  class RegexpFilter
  11  {
  12      /**
  13      * Filter a value by regexp
  14      *
  15      * @param  string $attrValue Original value
  16      * @param  string $regexp    Filtering regexp
  17      * @return mixed             Filtered value, or FALSE if invalid
  18      */
  19  	public static function filter($attrValue, $regexp)
  20      {
  21          return filter_var($attrValue, FILTER_VALIDATE_REGEXP, [
  22              'options' => ['regexp' => $regexp]
  23          ]);
  24      }
  25  }


Generated: Thu Mar 24 21:31:15 2022 Cross-referenced by PHPXref 0.7.1