<?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.getconstructor.php',
    1 => 'ReflectionClass::getConstructor',
    2 => 'Obtiene el constructor de una clase',
  ),
  'up' => 
  array (
    0 => 'class.reflectionclass.php',
    1 => 'ReflectionClass',
  ),
  'prev' => 
  array (
    0 => 'reflectionclass.getconstants.php',
    1 => 'ReflectionClass::getConstants',
  ),
  'next' => 
  array (
    0 => 'reflectionclass.getdefaultproperties.php',
    1 => 'ReflectionClass::getDefaultProperties',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'es',
    'path' => 'reference/reflection/reflectionclass/getconstructor.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="reflectionclass.getconstructor" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ReflectionClass::getConstructor</h1>
  <p class="verinfo">(PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">ReflectionClass::getConstructor</span> &mdash; <span class="dc-title">Obtiene el constructor de una clase</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-reflectionclass.getconstructor-description">
  <h3 class="title">Descripción</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>ReflectionClass::getConstructor</strong></span>(): <span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="class.reflectionmethod.php" class="type ReflectionMethod">ReflectionMethod</a></span></span></div>

  <p class="para rdfs-comment">
   Obtiene el constructor de una clase.
  </p>

 </div>


 <div class="refsect1 parameters" id="refsect1-reflectionclass.getconstructor-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.getconstructor-returnvalues">
  <h3 class="title">Valores devueltos</h3>
  <p class="para">
   Un objeto <span class="classname"><a href="class.reflectionmethod.php" class="classname">ReflectionMethod</a></span> que refleja el constructor
   de la clase, o <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> si la clase no tiene constructor.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-reflectionclass.getconstructor-examples">
  <h3 class="title">Ejemplos</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Ejemplo #1 Uso simple de <span class="methodname"><strong>ReflectionClass::getConstructor()</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">$constructor </span><span style="color: #007700">= </span><span style="color: #0000BB">$class</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getConstructor</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$constructor</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">object(ReflectionMethod)#2 (2) {
  [&quot;name&quot;]=&gt;
  string(11) &quot;__construct&quot;
  [&quot;class&quot;]=&gt;
  string(15) &quot;ReflectionClass&quot;
}</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-reflectionclass.getconstructor-seealso">
  <h3 class="title">Ver también</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="methodname"><a href="reflectionclass.getname.php" class="methodname" rel="rdfs-seeAlso">ReflectionClass::getName()</a> - Obtiene el nombre de la clase</span></li>
   </ul>
  </p>
 </div>


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