Dutch PHP Conference 2025 - Call For Papers

xml_set_end_namespace_decl_handler

(PHP 4 >= 4.0.5, PHP 5, PHP 7, PHP 8)

xml_set_end_namespace_decl_handlerSet up end namespace declaration handler

Опис

xml_set_end_namespace_decl_handler(XMLParser $parser, callable $handler): true

Set a handler to be called when leaving the scope of a namespace declaration. This will be called, for each namespace declaration, after the handler for the end tag of the element in which the namespace was declared.

Застереження

This event is not supported under libXML, so a registered handler wouldn't be called.

Параметри

parser

XML-парсер.

handler

Якщо задано null або порожній рядок, обробник буде відновлено до його початкового стану.

Якщо параметр handler має тип callable, то обробником стане функція/метод, що має таку назву виклику.

Параметру handler дозволяється мати тип string, якщо це назва метода об'єкта, встановленого функцією xml_set_object().

The signature of the handler must be:

handler(XMLParser $parser, string|false $prefix)
parser
XML-парсер, якого викликатиме обробник.
prefix
The prefix is a string used to reference the namespace within an XML object. false if no prefix exists.

Значення, що повертаються

Завжди повертає true.

Журнал змін

Версія Опис
8.0.0 Тепер параметр parser має бути примірником XMLParser. Раніше очікувався xml-resource.

Прогляньте також

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top