[ Index ]

PHP Cross Reference of phpBB-3.3.14-deutsch

title

Body

[close]

/vendor/s9e/regexp-builder/src/ -> Runner.php (source)

   1  <?php declare(strict_types=1);
   2  
   3  /**
   4  * @package   s9e\RegexpBuilder
   5  * @copyright Copyright (c) 2016-2022 The s9e authors
   6  * @license   http://www.opensource.org/licenses/mit-license.php The MIT License
   7  */
   8  namespace s9e\RegexpBuilder;
   9  
  10  use s9e\RegexpBuilder\Passes\PassInterface;
  11  
  12  class Runner
  13  {
  14      /**
  15      * @var PassInterface[]
  16      */
  17      protected $passes = [];
  18  
  19      /**
  20      * Add a pass to the list
  21      *
  22      * @param  PassInterface $pass
  23      * @return void
  24      */
  25  	public function addPass(PassInterface $pass): void
  26      {
  27          $this->passes[] = $pass;
  28      }
  29  
  30      /**
  31      * Run all passes on the list of strings
  32      *
  33      * @param  array[] $strings
  34      * @return array[]
  35      */
  36  	public function run(array $strings): array
  37      {
  38          foreach ($this->passes as $pass)
  39          {
  40              $strings = $pass->run($strings);
  41          }
  42  
  43          return $strings;
  44      }
  45  }


Generated: Mon Nov 25 19:05:08 2024 Cross-referenced by PHPXref 0.7.1