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