uTools-Manuals/docs/php/xml_set_end_namespace_decl_handler.html
2019-04-28 19:00:34 +08:00

147 lines
5.3 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>建立终止命名空间声明处理器</title>
</head>
<body class="docs"><div id="layout">
<div id="layout-content"><div id="function.xml-set-end-namespace-decl-handler" class="refentry">
<div class="refnamediv">
<h1 class="refname">xml_set_end_namespace_decl_handler</h1>
<p class="verinfo">(PHP 4 &gt;= 4.0.5, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">xml_set_end_namespace_decl_handler</span> &mdash; <span class="dc-title">
建立终止命名空间声明处理器
</span></p>
</div>
<div class="refsect1 description" id="refsect1-function.xml-set-end-namespace-decl-handler-description">
<h3 class="title">说明</h3>
<div class="methodsynopsis dc-description">
<span class="methodname"><strong>xml_set_end_namespace_decl_handler</strong></span>
( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$parser</code></span>
, <span class="methodparam"><span class="type"><a href="language.types.callable.html" class="type callable">callable</a></span> <code class="parameter">$handler</code></span>
) : <span class="type">bool</span></div>
<p class="para rdfs-comment">
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.
</p>
</div>
<div class="refsect1 parameters" id="refsect1-function.xml-set-end-namespace-decl-handler-parameters">
<h3 class="title">参数</h3>
<p class="para">
<dl>
<dt>
<code class="parameter">parser</code></dt>
<dd>
<p class="para">
A reference to the XML parser.
</p>
</dd>
<dt>
<code class="parameter">handler</code></dt>
<dd>
<p class="para">
<code class="parameter">handler</code> is a string containing the name of a
function that must exist when <span class="function"><a href="xml_parse.html" class="function">xml_parse()</a></span> is called
for <code class="parameter">parser</code>.
</p>
<p class="para">
The function named by <code class="parameter">handler</code> must accept
two parameters, and should return an integer value. If the
value returned from the handler is <strong><code>FALSE</code></strong> (which it will be if no
value is returned), the XML parser will stop parsing and
<span class="function"><a href="xml_get_error_code.html" class="function">xml_get_error_code()</a></span> will return
<strong><code>XML_ERROR_EXTERNAL_ENTITY_HANDLING</code></strong>.
<div class="methodsynopsis dc-description">
<span class="methodname"><span class="replaceable">handler</span></span>
( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$parser</code></span>
, <span class="methodparam"><span class="type">string</span> <code class="parameter">$prefix</code></span>
)</div>
<dl>
<dt>
<code class="parameter">parser</code></dt>
<dd>
<span class="simpara">
The first parameter, <span class="replaceable">parser</span>, is a
reference to the XML parser calling the handler.
</span>
</dd>
<dt>
<code class="parameter">prefix</code></dt>
<dd>
<span class="simpara">
The prefix is a string used to reference the namespace within an XML object.
</span>
</dd>
</dl>
</p>
<p class="para">
If a handler function is set to an empty string, or <strong><code>FALSE</code></strong>, the handler
in question is disabled.
</p>
<blockquote class="note"><p><strong class="note">Note</strong>: <span class="simpara">除了函数名,含有对象引用的数组和方法名也可以作为参数。</span></p></blockquote>
</dd>
</dl>
</p>
</div>
<div class="refsect1 returnvalues" id="refsect1-function.xml-set-end-namespace-decl-handler-returnvalues">
<h3 class="title">返回值</h3>
<p class="para">
成功时返回 <strong><code>TRUE</code></strong> 或者在失败时返回 <strong><code>FALSE</code></strong>
</p>
</div>
<div class="refsect1 notes" id="refsect1-function.xml-set-end-namespace-decl-handler-notes">
<h3 class="title">注释</h3>
<blockquote class="note"><p><strong class="note">Note</strong>:
<p class="para">
This event is not supported under LibXML.
</p>
</p></blockquote>
</div>
<div class="refsect1 seealso" id="refsect1-function.xml-set-end-namespace-decl-handler-seealso">
<h3 class="title">参见</h3>
<p class="para">
<ul class="simplelist">
<li class="member"><span class="function"><a href="xml_set_start_namespace_decl_handler.html" class="function" rel="rdfs-seeAlso">xml_set_start_namespace_decl_handler()</a> - 建立起始命名空间声明处理器</span></li>
</ul>
</p>
</div>
</div></div></div></body></html>