Beispiel #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];
 }
Beispiel #2
0
 /**
  * @param FunctionMap $functionMap
  */
 public function register(FunctionMap $functionMap)
 {
     $functionMap->set('current-group', $this);
 }
Beispiel #3
0
 /**
  * @param FunctionMap $functionMap
  * @return void
  */
 public function register(FunctionMap $functionMap)
 {
     $functionMap->set(XslTransformations::URI . ':group-iterate', $this);
 }
Beispiel #4
0
 /**
  * @param FunctionMap $functionMap
  * @return void
  */
 public function register(FunctionMap $functionMap)
 {
     $functionMap->set($this->name, $this);
 }