[ Index ]

PHP Cross Reference of phpBB-3.3.14-deutsch

title

Body

[close]

/vendor/s9e/text-formatter/src/Configurator/TemplateNormalizations/ -> Custom.php (source)

   1  <?php
   2  
   3  /**
   4  * @package   s9e\TextFormatter
   5  * @copyright Copyright (c) 2010-2022 The s9e authors
   6  * @license   http://www.opensource.org/licenses/mit-license.php The MIT License
   7  */
   8  namespace s9e\TextFormatter\Configurator\TemplateNormalizations;
   9  
  10  use DOMElement;
  11  
  12  class Custom extends AbstractNormalization
  13  {
  14      /**
  15      * @var callable Normalization callback
  16      */
  17      protected $callback;
  18  
  19      /**
  20      * Constructor
  21      *
  22      * @param callable $callback Normalization callback
  23      */
  24  	public function __construct(callable $callback)
  25      {
  26          $this->callback = $callback;
  27      }
  28  
  29      /**
  30      * Call the user-supplied callback
  31      *
  32      * @param  DOMElement $template <xsl:template/> node
  33      * @return void
  34      */
  35  	public function normalize(DOMElement $template)
  36      {
  37          call_user_func($this->callback, $template);
  38      }
  39  }


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