<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.reflectionproperty.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'fr',
  ),
  'this' => 
  array (
    0 => 'reflectionproperty.gethooks.php',
    1 => 'ReflectionProperty::getHooks',
    2 => 'Renvoie un tableau de tous les hooks sur cette propri&eacute;t&eacute;',
  ),
  'up' => 
  array (
    0 => 'class.reflectionproperty.php',
    1 => 'ReflectionProperty',
  ),
  'prev' => 
  array (
    0 => 'reflectionproperty.gethook.php',
    1 => 'ReflectionProperty::getHook',
  ),
  'next' => 
  array (
    0 => 'reflectionproperty.getmodifiers.php',
    1 => 'ReflectionProperty::getModifiers',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'fr',
    'path' => 'reference/reflection/reflectionproperty/gethooks.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="reflectionproperty.gethooks" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ReflectionProperty::getHooks</h1>
  <p class="verinfo">(PHP 8 &gt;= 8.4.0)</p><p class="refpurpose"><span class="refname">ReflectionProperty::getHooks</span> &mdash; <span class="dc-title">Renvoie un tableau de tous les hooks sur cette propriété</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-reflectionproperty.gethooks-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>ReflectionProperty::getHooks</strong></span>(): <span class="type"><a href="language.types.array.php" class="type array">array</a></span></div>

  <p class="simpara">
   Renvoie une liste de tous les hooks sur cette propriété.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-reflectionproperty.gethooks-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-reflectionproperty.gethooks-returnvalues">
  <h3 class="title">Valeurs de retour</h3>
  <p class="simpara">
   Un tableau de <span class="classname"><a href="class.reflectionmethod.php" class="classname">ReflectionMethod</a></span> objets indexés par le hook auquel ils correspondent.
   Par exemple, une propriété avec des hooks <code class="literal">get</code> et <code class="literal">set</code> renverra
   un tableau à 2 éléments avec des clés de chaîne <code class="literal">get</code> et <code class="literal">set</code>,
   chacune est un objet <span class="classname"><a href="class.reflectionmethod.php" class="classname">ReflectionMethod</a></span>.
   L&#039;ordre dans lequel ils sont retournés est explicitement indéfini.
   Si aucun hook n&#039;est défini, un tableau vide est retourné.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-reflectionproperty.gethooks-examples">
  <h3 class="title">Exemples</h3>
  <div class="example" id="reflectionproperty.gethooks.example.basic">
   <p><strong>Exemple #1 Exemple de <span class="methodname"><strong>ReflectionProperty::getHooks()</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">Example<br /></span><span style="color: #007700">{<br />    public </span><span style="color: #0000BB">string $name </span><span style="color: #007700">{ </span><span style="color: #0000BB">get </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">"Name here"</span><span style="color: #007700">; }<br /><br />    public </span><span style="color: #0000BB">int $count</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #0000BB">$rClass </span><span style="color: #007700">= new </span><span style="color: #0000BB">\ReflectionClass</span><span style="color: #007700">(</span><span style="color: #0000BB">Example</span><span style="color: #007700">::class);<br /><br /></span><span style="color: #0000BB">$rProp </span><span style="color: #007700">= </span><span style="color: #0000BB">$rClass</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getProperty</span><span style="color: #007700">(</span><span style="color: #DD0000">'name'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$rProp</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getHooks</span><span style="color: #007700">());<br /><br /></span><span style="color: #0000BB">$rProp </span><span style="color: #007700">= </span><span style="color: #0000BB">$rClass</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getProperty</span><span style="color: #007700">(</span><span style="color: #DD0000">'count'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$rProp</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getHooks</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(1) {
  [&quot;get&quot;]=&gt;
  object(ReflectionMethod)#3 (2) {
    [&quot;name&quot;]=&gt;
    string(10) &quot;$name::get&quot;
    [&quot;class&quot;]=&gt;
    string(7) &quot;Example&quot;
  }
}
array(0) {
}</pre>
</div>
   </div>
  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-reflectionproperty.gethooks-seealso">
  <h3 class="title">Voir aussi</h3>
  <ul class="simplelist">
   <li><span class="classname"><a href="class.reflectionmethod.php" class="classname">ReflectionMethod</a></span></li>
   <li><span class="methodname"><a href="reflectionproperty.hashooks.php" class="methodname" rel="rdfs-seeAlso">ReflectionProperty::hasHooks()</a> - Renvoie si la propri&eacute;t&eacute; a des hooks d&eacute;finis</span></li>
  </ul>
 </div>


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