<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.php-user-filter.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'php-user-filter.oncreate.php',
    1 => 'php_user_filter::onCreate',
    2 => 'Called when creating the filter',
  ),
  'up' => 
  array (
    0 => 'class.php-user-filter.php',
    1 => 'php_user_filter',
  ),
  'prev' => 
  array (
    0 => 'php-user-filter.onclose.php',
    1 => 'php_user_filter::onClose',
  ),
  'next' => 
  array (
    0 => 'class.streamwrapper.php',
    1 => 'streamWrapper',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/stream/php_user_filter/oncreate.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="php-user-filter.oncreate" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">php_user_filter::onCreate</h1>
  <p class="verinfo">(PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">php_user_filter::onCreate</span> &mdash; <span class="dc-title">Called when creating the filter</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-php-user-filter.oncreate-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>php_user_filter::onCreate</strong></span>(): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   This method is called during instantiation of the filter class
   object.  If your filter allocates or initializes any other resources
   (such as a buffer), this is the place to do it.
  </p>

  <p class="para">
   When your filter is first instantiated, and
   <code class="literal">yourfilter-&gt;onCreate()</code> is called, a number of properties
   will be available as shown in the table below.
  </p>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>Property</th>
       <th>Contents</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td><code class="literal">FilterClass-&gt;filtername</code></td>
       <td>
        A string containing the name the filter was instantiated with.
        Filters may be registered under multiple names or under wildcards.
        Use this property to determine which name was used.
       </td>
      </tr>

      <tr>
       <td><code class="literal">FilterClass-&gt;params</code></td>
       <td>
        The contents of the <code class="parameter">params</code> parameter passed
        to <span class="function"><a href="function.stream-filter-append.php" class="function">stream_filter_append()</a></span>
        or <span class="function"><a href="function.stream-filter-prepend.php" class="function">stream_filter_prepend()</a></span>.
       </td>
      </tr>

      <tr>
       <td><code class="literal">FilterClass-&gt;stream</code></td>
       <td>
        The stream resource being filtered. Maybe available only during
        <span class="methodname"><strong>filter()</strong></span> calls when the 
        <code class="literal">closing</code> parameter is set to <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>.
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>

 </div>


 <div class="refsect1 parameters" id="refsect1-php-user-filter.oncreate-parameters">
  <h3 class="title">参数</h3>
  <p class="para">此函数没有参数。</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-php-user-filter.oncreate-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Your implementation of
   this method should return <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> on failure, or <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> on success.
  </p>
 </div>



</div><?php manual_footer($setup); ?>