<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.reflectionclass.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'reflectionclass.resetaslazyproxy.php',
    1 => 'ReflectionClass::resetAsLazyProxy',
    2 => 'Resets an object and marks it as lazy',
  ),
  'up' => 
  array (
    0 => 'class.reflectionclass.php',
    1 => 'ReflectionClass',
  ),
  'prev' => 
  array (
    0 => 'reflectionclass.resetaslazyghost.php',
    1 => 'ReflectionClass::resetAsLazyGhost',
  ),
  'next' => 
  array (
    0 => 'reflectionclass.setstaticpropertyvalue.php',
    1 => 'ReflectionClass::setStaticPropertyValue',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/reflection/reflectionclass/resetaslazyproxy.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="reflectionclass.resetaslazyproxy" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ReflectionClass::resetAsLazyProxy</h1>
  <p class="verinfo">(PHP 8 &gt;= 8.4.0)</p><p class="refpurpose"><span class="refname">ReflectionClass::resetAsLazyProxy</span> &mdash; <span class="dc-title">Resets an object and marks it as lazy</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-reflectionclass.resetaslazyproxy-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>ReflectionClass::resetAsLazyProxy</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.object.php" class="type object">object</a></span> <code class="parameter">$object</code></span>, <span class="methodparam"><span class="type"><a href="language.types.callable.php" class="type callable">callable</a></span> <code class="parameter">$factory</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$options</code><span class="initializer"> = 0</span></span>): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>

  <p class="simpara">
   The behavior of this method is the same as
   <span class="methodname"><a href="reflectionclass.resetaslazyghost.php" class="methodname">ReflectionClass::resetAsLazyGhost()</a></span> except that it
   uses the proxy strategy.
  </p>
  <p class="simpara">
   The <code class="parameter">object</code> itself becomes the proxy. Similarly to
   <span class="methodname"><a href="reflectionclass.resetaslazyghost.php" class="methodname">ReflectionClass::resetAsLazyGhost()</a></span>, the object is not
   replaced by an other one, and its identity does not change, even after
   initialization. The proxy and the real instance are distinct objects, with
   distinct identities.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-reflectionclass.resetaslazyproxy-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <dl>
   
    <dt><code class="parameter">object</code></dt>
    <dd>
     <span class="simpara">
      A non-lazy object, or an initialized lazy object.
     </span>
    </dd>
   
   
    <dt><code class="parameter">factory</code></dt>
    <dd>
     <span class="simpara">
      An factory callback with the same signature and purpose as in
      <span class="methodname"><a href="reflectionclass.newlazyproxy.php" class="methodname">ReflectionClass::newLazyProxy()</a></span>.
     </span>
    </dd>
   
   
    <dt><code class="parameter">options</code></dt><dd>
     <p class="para">
      <code class="parameter">options</code> can be a combination of the following
      flags:
      <dl>
       
        <dt>
         <strong><code><a href="class.reflectionclass.php#reflectionclass.constants.skip-initialization-on-serialize">ReflectionClass::SKIP_INITIALIZATION_ON_SERIALIZE</a></code></strong>
        </dt>
        <dd>
         <span class="simpara">
          By default, serializing a lazy object triggers its
          initialization. Setting this flag prevents initialization, allowing
          lazy objects to be serialized without being initialized.
         </span>
        </dd>
       
       
        <dt>
         <strong><code><a href="class.reflectionclass.php#reflectionclass.constants.skip-destructor">ReflectionClass::SKIP_DESTRUCTOR</a></code></strong>
        </dt>
        <dd>
         <span class="simpara">
          By default, the object destructor is called (if any) before making it
          lazy. This provides safety regarding any preexisting state in the
          object. This flag disables that behavior, allowing objects to be reset
          as lazy without calling the destructor.
         </span>
        </dd>
       
      </dl>
     </p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-reflectionclass.resetaslazyproxy-returnvalues">
  <h3 class="title">Valori restituiti</h3>
  <p class="simpara">
   Nessun valore viene restituito.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-reflectionclass.resetaslazyproxy-errors">
  <h3 class="title">Errori/Eccezioni</h3>
  <p class="simpara">
   A <span class="classname"><a href="class.reflectionexception.php" class="classname">ReflectionException</a></span> if the object is lazy and
   non-initialized.
  </p>
  <p class="simpara">
   An <span class="classname"><a href="class.error.php" class="classname">Error</a></span> if the object is being initialized, or if the
   object properties are being iterated with
   <a href="control-structures.foreach.php" class="link"><code class="literal">foreach</code></a>.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-reflectionclass.resetaslazyproxy-seealso">
  <h3 class="title">Vedere anche:</h3>
  <ul class="simplelist">
   <li><span class="methodname"><a href="reflectionclass.newlazyproxy.php" class="methodname" rel="rdfs-seeAlso">ReflectionClass::newLazyProxy()</a> - Creates a new lazy proxy instance</span></li>
   <li><span class="methodname"><a href="reflectionclass.resetaslazyghost.php" class="methodname" rel="rdfs-seeAlso">ReflectionClass::resetAsLazyGhost()</a> - Resets an object and marks it as lazy</span></li>
  </ul>
 </div>


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