<?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 => 'tr',
  ),
  'this' => 
  array (
    0 => 'reflectionclass.resetaslazyghost.php',
    1 => 'ReflectionClass::resetAsLazyGhost',
    2 => 'Resets an object and marks it as lazy',
  ),
  'up' => 
  array (
    0 => 'class.reflectionclass.php',
    1 => 'ReflectionClass',
  ),
  'prev' => 
  array (
    0 => 'reflectionclass.newlazyproxy.php',
    1 => 'ReflectionClass::newLazyProxy',
  ),
  'next' => 
  array (
    0 => 'reflectionclass.resetaslazyproxy.php',
    1 => 'ReflectionClass::resetAsLazyProxy',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/reflection/reflectionclass/resetaslazyghost.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

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

 </div>

 <div class="refsect1 description" id="refsect1-reflectionclass.resetaslazyghost-description">
  <h3 class="title">Açıklama</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>ReflectionClass::resetAsLazyGhost</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">$initializer</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">
   Resets an existing <code class="parameter">object</code> and marks it as lazy.
  </p>
  <p class="simpara">
   The object&#039;s destructor is called (if one exists) unless the
   <strong><code>ReflectionClass::SKIP_DESTRUCTOR</code></strong> flag is specified. In
   the special case where the object is an initialized proxy, the real instance
   is detached from the proxy. If the real instance is no longer referenced
   elsewhere, its destructor is called regardless of the
   <strong><code>SKIP_DESTRUCTOR</code></strong> flag.
  </p>
  <p class="simpara">
   Dynamic properties are removed, and the value of properties declared on the
   class is discarded as though <span class="function"><a href="function.unset.php" class="function">unset()</a></span> was called, and
   marked as lazy. This implies that if the object is an instance of a subclass
   with additional properties, these properties are not modified and not made
   lazy.
   <a href="language.oop5.properties.php#language.oop5.properties.readonly-properties" class="link">Readonly
   properties</a> are also not modified and not made lazy if they are
   <code class="literal">final</code> or the class itself is <code class="literal">final</code>.
  </p>
  <p class="simpara">
   If no properties were marked lazy, the object is not marked as lazy. See
   also
   <a href="language.oop5.lazy-objects.php#language.oop5.lazy-objects.lifecycle" class="link">Lazy Objects
   Lifecycle</a>.
  </p>
  <p class="simpara">
   Otherwise, after calling this method, the behavior of the object is the same
   as an object created by
   <span class="methodname"><a href="reflectionclass.newlazyghost.php" class="methodname">ReflectionClass::newLazyGhost()</a></span> (except for
   subclass and readonly properties, as described above).
  </p>
  <p class="simpara">
   The object is not replaced by another one, and its identity remains
   unchanged. Functionality such as <span class="function"><a href="function.spl-object-id.php" class="function">spl_object_id()</a></span>,
   <span class="function"><a href="function.spl-object-hash.php" class="function">spl_object_hash()</a></span>,
   <span class="classname"><a href="class.splobjectstorage.php" class="classname">SplObjectStorage</a></span>, <span class="classname"><a href="class.weakmap.php" class="classname">WeakMap</a></span>,
   <span class="classname"><a href="class.weakreference.php" class="classname">WeakReference</a></span>, or
   <a href="language.oop5.object-comparison.php" class="link">the identity operator
   (<code class="literal">===</code>)</a> are unaffected.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-reflectionclass.resetaslazyghost-parameters">
  <h3 class="title">Bağımsız Değişkenler</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">initializer</code></dt>
    <dd>
     <span class="simpara">
      An initializer callback with the same signature and purpose as in
      <span class="methodname"><a href="reflectionclass.newlazyghost.php" class="methodname">ReflectionClass::newLazyGhost()</a></span>.
     </span>
    </dd>
   
   
    <dt id="reflectionclass.resetaslazyghost.parameters.options"><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>ReflectionClass::SKIP_INITIALIZATION_ON_SERIALIZE</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>ReflectionClass::SKIP_DESTRUCTOR</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.resetaslazyghost-returnvalues">
  <h3 class="title">Dönen Değerler</h3>
  <p class="simpara">
   Hiçbir değer dönmez.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-reflectionclass.resetaslazyghost-errors">
  <h3 class="title">Hatalar/İstisnalar</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.resetaslazyghost-seealso">
  <h3 class="title">Ayrıca Bakınız</h3>
  <ul class="simplelist">
   <li><span class="methodname"><a href="reflectionclass.newlazyghost.php" class="methodname" rel="rdfs-seeAlso">ReflectionClass::newLazyGhost()</a> - Creates a new lazy ghost instance</span></li>
   <li><span class="methodname"><a href="reflectionclass.resetaslazyproxy.php" class="methodname" rel="rdfs-seeAlso">ReflectionClass::resetAsLazyProxy()</a> - Resets an object and marks it as lazy</span></li>
  </ul>
 </div>


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