Sophie

Sophie

distrib > Mageia > 7 > aarch64 > by-pkgid > 2b917e0437961edec048f1d15e2d7449 > files > 7171

php-manual-en-7.2.11-1.mga7.noarch.rpm

<!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>Set up notation declaration handler</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.xml-set-external-entity-ref-handler.html">xml_set_external_entity_ref_handler</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.xml-set-object.html">xml_set_object</a></div>
 <div class="up"><a href="ref.xml.html">XML Parser Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.xml-set-notation-decl-handler" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">xml_set_notation_decl_handler</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">xml_set_notation_decl_handler</span> &mdash; <span class="dc-title">Set up notation declaration handler</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.xml-set-notation-decl-handler-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">bool</span> <span class="methodname"><strong>xml_set_notation_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>
   )</div>

  <p class="para rdfs-comment">
   Sets the notation declaration handler function for the XML parser
   <code class="parameter">parser</code>.
  </p>
  <p class="para">
   A notation declaration is part of the document&#039;s DTD and has the
   following format:    
   <div class="example-contents">
<div class="xmlcode"><pre class="xmlcode">&lt;!NOTATION &lt;parameter&gt;name&lt;/parameter&gt;
{ &lt;parameter&gt;systemId&lt;/parameter&gt; | &lt;parameter&gt;publicId&lt;/parameter&gt;?&gt;</pre>
</div>
   </div>

   See <a href="http://www.w3.org/TR/1998/REC-xml-19980210#Notations" class="link external">&raquo;&nbsp;section 4.7 of the XML 1.0
   spec</a> for the definition of notation declarations.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.xml-set-notation-decl-handler-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>

    
     <dt>
<code class="parameter">parser</code></dt>

     <dd>

      <p class="para">
       A reference to the XML parser to set up notation declaration handler function.
      </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="function.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
       five parameters:
       <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">$notation_name</code></span>
        , <span class="methodparam"><span class="type">string</span> <code class="parameter">$base</code></span>
        , <span class="methodparam"><span class="type">string</span> <code class="parameter">$system_id</code></span>
        , <span class="methodparam"><span class="type">string</span> <code class="parameter">$public_id</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">notation_name</code></dt>

         <dd>

          <span class="simpara">
           This is the notation&#039;s <code class="parameter">name</code>, as per
           the notation format described above.
          </span>
         </dd>

        
        
         <dt>

          <code class="parameter">base</code>
         </dt>

         <dd>

          <span class="simpara">
           This is the base for resolving the system identifier
           (<code class="parameter">system_id</code>) of the notation declaration.
           Currently this parameter will always be set to an empty string.
          </span>
         </dd>

        
        
         <dt>
<code class="parameter">system_id</code></dt>

         <dd>

          <span class="simpara">
           System identifier of the external notation declaration.
          </span>
         </dd>

        
        
         <dt>

          <code class="parameter">public_id</code>
         </dt>

         <dd>

          <span class="simpara">
           Public identifier of the external notation declaration.
          </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">Instead of a function name, an
array containing an object reference and a method name can also be
supplied.</span></p></blockquote>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.xml-set-notation-decl-handler-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns <strong><code>TRUE</code></strong> on success or <strong><code>FALSE</code></strong> on failure.
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.xml-set-external-entity-ref-handler.html">xml_set_external_entity_ref_handler</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.xml-set-object.html">xml_set_object</a></div>
 <div class="up"><a href="ref.xml.html">XML Parser Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>