Exemplo n.º 1
0
 /**
  * @param Lexer $lexer
  * @param DOMNode $currentElement
  * @return string[]
  */
 private function createFunctionTokens(Lexer $lexer, DOMNode $currentElement)
 {
     $token = $lexer->current();
     $documentElement = $currentElement->ownerDocument->documentElement;
     $namespaces = FetchNamespacesFromNode::fetch($documentElement);
     $functionName = $this->convertTokenToFunctionName($token, $namespaces);
     if ($this->functions->has($functionName)) {
         $function = $this->functions->get($functionName);
         if ($function instanceof ReplaceFunctionInterface) {
             return $function->replace($lexer, $currentElement);
         }
     }
     return [$token];
 }
Exemplo n.º 2
0
 /**
  * @param FunctionMap $functionMap
  */
 public function register(FunctionMap $functionMap)
 {
     $functionMap->set('current-group', $this);
 }
Exemplo n.º 3
0
 /**
  * @param FunctionMap $functionMap
  * @return void
  */
 public function register(FunctionMap $functionMap)
 {
     $functionMap->set(XslTransformations::URI . ':group-iterate', $this);
 }
Exemplo n.º 4
0
 /**
  * @param FunctionMap $functionMap
  * @return void
  */
 public function register(FunctionMap $functionMap)
 {
     $functionMap->set($this->name, $this);
 }