<?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 => 'fr',
  ),
  'this' => 
  array (
    0 => 'reflectionclass.getdefaultproperties.php',
    1 => 'ReflectionClass::getDefaultProperties',
    2 => 'R&eacute;cup&egrave;re les propri&eacute;t&eacute;s par d&eacute;faut',
  ),
  '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' => 'fr',
    '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">Récupère les propriétés par défaut</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-reflectionclass.getdefaultproperties-description">
  <h3 class="title">Description</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">
   Récupère les propriétés par défaut d&#039;une classe (incluant les propriétés héritées).
  </p>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <p class="para">
    Cette méthode fonctionne uniquement pour les propriétés statiques lorsqu&#039;utilisées sur des classes internes.
    La valeur par défaut d&#039;une propriété de classe statique
    ne peut pas être surveillée lors de l&#039;utilisation de cette méthode sur des
    classes définies par l&#039;utilisateur.
   </p>
  </p></blockquote>
 </div>


 <div class="refsect1 parameters" id="refsect1-reflectionclass.getdefaultproperties-parameters">
  <h3 class="title">Liste de paramètres</h3>
  <p class="para">Cette fonction ne contient aucun paramètre.</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-reflectionclass.getdefaultproperties-returnvalues">
  <h3 class="title">Valeurs de retour</h3>
  <p class="para">
   Un <a href="language.types.array.php" class="link">tableau</a> des propriétés par défaut dont la clé est le nom de la 
   propriété et la valeur est la valeur par défaut de la propriété ou <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>
   si la propriété n&#039;a pas de valeur par défaut.
   La fonction ne fait pas la distinction entre les propriétés statiques et
   non statiques et ne prend pas en compte la visibilité.
  </p>
 </div>

 
 <div class="refsect1 examples" id="refsect1-reflectionclass.getdefaultproperties-examples">
  <h3 class="title">Exemples</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Exemple #1 Exemple avec <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>L&#039;exemple ci-dessus va afficher :</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">Voir aussi</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="methodname"><a href="reflectionclass.getproperties.php" class="methodname" rel="rdfs-seeAlso">ReflectionClass::getProperties()</a> - R&eacute;cup&egrave;re les propri&eacute;t&eacute;s</span></li>
    <li><span class="methodname"><a href="reflectionclass.getstaticproperties.php" class="methodname" rel="rdfs-seeAlso">ReflectionClass::getStaticProperties()</a> - R&eacute;cup&egrave;re les propri&eacute;t&eacute;s statiques</span></li>
    <li><span class="methodname"><a href="reflectionclass.getproperty.php" class="methodname" rel="rdfs-seeAlso">ReflectionClass::getProperty()</a> - R&eacute;cup&egrave;re une ReflectionProperty pour une propri&eacute;t&eacute; d'une classe</span></li>
   </ul>
  </p>
 </div>


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