<?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 => 'es',
  ),
  'this' => 
  array (
    0 => 'reflectionclass.getdefaultproperties.php',
    1 => 'ReflectionClass::getDefaultProperties',
    2 => 'Obtiene las propiedades por defecto',
  ),
  'up' => 
  array (
    0 => 'class.reflectionclass.php',
    1 => 'ReflectionClass',
  ),
  'prev' => 
  array (
    0 => 'reflectionclass.getconstructor.php',
    1 => 'ReflectionClass::getConstructor',
  ),
  'next' => 
  array (
    0 => 'reflectionclass.getdoccomment.php',
    1 => 'ReflectionClass::getDocComment',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'es',
    'path' => 'reference/reflection/reflectionclass/getdefaultproperties.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="reflectionclass.getdefaultproperties" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ReflectionClass::getDefaultProperties</h1>
  <p class="verinfo">(PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">ReflectionClass::getDefaultProperties</span> &mdash; <span class="dc-title">Obtiene las propiedades por defecto</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-reflectionclass.getdefaultproperties-description">
  <h3 class="title">Descripción</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>ReflectionClass::getDefaultProperties</strong></span>(): <span class="type"><a href="language.types.array.php" class="type array">array</a></span></div>

  <p class="para rdfs-comment">
   Obtiene las propiedades por defecto de una clase (incluyendo las propiedades heredadas).
  </p>
  <blockquote class="note"><p><strong class="note">Nota</strong>: 
   <p class="para">
    Este método funciona únicamente para las propiedades estáticas cuando se utiliza en clases internas.
    El valor por defecto de una propiedad de clase estática
    no puede ser monitoreado al utilizar este método en
    clases definidas por el usuario.
   </p>
  </p></blockquote>
 </div>


 <div class="refsect1 parameters" id="refsect1-reflectionclass.getdefaultproperties-parameters">
  <h3 class="title">Parámetros</h3>
  <p class="para">Esta función no contiene ningún parámetro.</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-reflectionclass.getdefaultproperties-returnvalues">
  <h3 class="title">Valores devueltos</h3>
  <p class="para">
   Un <span class="type"><a href="language.types.array.php" class="type array">array</a></span> de propiedades por defecto donde la clave es el nombre de la
   propiedad y el valor es el valor por defecto de la propiedad o <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>
   si la propiedad no tiene valor por defecto.
   La función no distingue entre propiedades estáticas y no estáticas y no considera la visibilidad.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-reflectionclass.getdefaultproperties-examples">
  <h3 class="title">Ejemplos</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Ejemplo #1 Ejemplo con <span class="methodname"><strong>ReflectionClass::getDefaultProperties()</strong></span></strong></p>
    <div class="example-contents">
<div class="annotation-interactive phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">class </span><span style="color: #0000BB">Bar </span><span style="color: #007700">{<br />    protected </span><span style="color: #0000BB">$inheritedProperty </span><span style="color: #007700">= </span><span style="color: #DD0000">'inheritedDefault'</span><span style="color: #007700">;<br />}<br /><br />class </span><span style="color: #0000BB">Foo </span><span style="color: #007700">extends </span><span style="color: #0000BB">Bar </span><span style="color: #007700">{<br />    public </span><span style="color: #0000BB">$property </span><span style="color: #007700">= </span><span style="color: #DD0000">'propertyDefault'</span><span style="color: #007700">;<br />    private </span><span style="color: #0000BB">$privateProperty </span><span style="color: #007700">= </span><span style="color: #DD0000">'privatePropertyDefault'</span><span style="color: #007700">;<br />    public static </span><span style="color: #0000BB">$staticProperty </span><span style="color: #007700">= </span><span style="color: #DD0000">'staticProperty'</span><span style="color: #007700">;<br />    public </span><span style="color: #0000BB">$defaultlessProperty</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #0000BB">$reflectionClass </span><span style="color: #007700">= new </span><span style="color: #0000BB">ReflectionClass</span><span style="color: #007700">(</span><span style="color: #DD0000">'Foo'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$reflectionClass</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getDefaultProperties</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>El ejemplo anterior mostrará:</p></div>
    <div class="example-contents screen">
<div class="annotation-interactive examplescode"><pre class="examplescode">array(5) {
   [&quot;staticProperty&quot;]=&gt;
   string(14) &quot;staticProperty&quot;
   [&quot;property&quot;]=&gt;
   string(15) &quot;propertyDefault&quot;
   [&quot;privateProperty&quot;]=&gt;
   string(22) &quot;privatePropertyDefault&quot;
   [&quot;defaultlessProperty&quot;]=&gt;
   NULL
   [&quot;inheritedProperty&quot;]=&gt;
   string(16) &quot;inheritedDefault&quot;
}</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-reflectionclass.getdefaultproperties-seealso">
  <h3 class="title">Ver también</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="methodname"><a href="reflectionclass.getproperties.php" class="methodname" rel="rdfs-seeAlso">ReflectionClass::getProperties()</a> - Obtiene las propiedades</span></li>
    <li><span class="methodname"><a href="reflectionclass.getstaticproperties.php" class="methodname" rel="rdfs-seeAlso">ReflectionClass::getStaticProperties()</a> - Obtiene las propiedades est&aacute;ticas</span></li>
    <li><span class="methodname"><a href="reflectionclass.getproperty.php" class="methodname" rel="rdfs-seeAlso">ReflectionClass::getProperty()</a> - Obtiene un objeto ReflectionProperty para una propiedad de una clase</span></li>
   </ul>
  </p>
 </div>


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