<?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.getmethod.php',
    1 => 'ReflectionClass::getMethod',
    2 => 'R&eacute;cup&egrave;re un ReflectionMethod pour une m&eacute;thode de classe',
  ),
  'up' => 
  array (
    0 => 'class.reflectionclass.php',
    1 => 'ReflectionClass',
  ),
  'prev' => 
  array (
    0 => 'reflectionclass.getlazyinitializer.php',
    1 => 'ReflectionClass::getLazyInitializer',
  ),
  'next' => 
  array (
    0 => 'reflectionclass.getmethods.php',
    1 => 'ReflectionClass::getMethods',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'fr',
    'path' => 'reference/reflection/reflectionclass/getmethod.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="reflectionclass.getmethod" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ReflectionClass::getMethod</h1>
  <p class="verinfo">(PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">ReflectionClass::getMethod</span> &mdash; <span class="dc-title">Récupère un <span class="classname"><a href="class.reflectionmethod.php" class="classname">ReflectionMethod</a></span> pour une méthode de classe</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-reflectionclass.getmethod-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>ReflectionClass::getMethod</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$name</code></span>): <span class="type"><a href="class.reflectionmethod.php" class="type ReflectionMethod">ReflectionMethod</a></span></div>

  <p class="para rdfs-comment">
   Récupère un <span class="classname"><a href="class.reflectionmethod.php" class="classname">ReflectionMethod</a></span> pour une méthode de classe.
  </p>

 </div>


 <div class="refsect1 parameters" id="refsect1-reflectionclass.getmethod-parameters">
  <h3 class="title">Liste de paramètres</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">name</code></dt>
     <dd>
      <p class="para">
       Le nom de la méthode à refléter.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-reflectionclass.getmethod-returnvalues">
  <h3 class="title">Valeurs de retour</h3>
  <p class="para">
   Un objet <span class="classname"><a href="class.reflectionmethod.php" class="classname">ReflectionMethod</a></span>.
  </p>
 </div>

 
 <div class="refsect1 errors" id="refsect1-reflectionclass.getmethod-errors">
  <h3 class="title">Erreurs / Exceptions</h3>
  <p class="para">
   Une exception <span class="classname"><a href="class.reflectionexception.php" class="classname">ReflectionException</a></span> si la méthode n&#039;existe pas.
  </p>
 </div>

 
 <div class="refsect1 examples" id="refsect1-reflectionclass.getmethod-examples">
  <h3 class="title">Exemples</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Exemple #1 Utilisation simple de <span class="methodname"><strong>ReflectionClass::getMethod()</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 />$class </span><span style="color: #007700">= new </span><span style="color: #0000BB">ReflectionClass</span><span style="color: #007700">(</span><span style="color: #DD0000">'ReflectionClass'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$method </span><span style="color: #007700">= </span><span style="color: #0000BB">$class</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getMethod</span><span style="color: #007700">(</span><span style="color: #DD0000">'getMethod'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$method</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">object(ReflectionMethod)#2 (2) {
  [&quot;name&quot;]=&gt;
  string(9) &quot;getMethod&quot;
  [&quot;class&quot;]=&gt;
  string(15) &quot;ReflectionClass&quot;
}</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-reflectionclass.getmethod-seealso">
  <h3 class="title">Voir aussi</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="methodname"><a href="reflectionclass.getmethods.php" class="methodname" rel="rdfs-seeAlso">ReflectionClass::getMethods()</a> - R&eacute;cup&egrave;re un tableau des m&eacute;thodes</span></li>
   </ul>
  </p>
 </div>


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