<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.reflectionparameter.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'es',
  ),
  'this' => 
  array (
    0 => 'reflectionparameter.getclass.php',
    1 => 'ReflectionParameter::getClass',
    2 => 'Obtiene un objeto ReflectionClass para el par&aacute;metro que se est&aacute; reflejando o null',
  ),
  'up' => 
  array (
    0 => 'class.reflectionparameter.php',
    1 => 'ReflectionParameter',
  ),
  'prev' => 
  array (
    0 => 'reflectionparameter.getattributes.php',
    1 => 'ReflectionParameter::getAttributes',
  ),
  'next' => 
  array (
    0 => 'reflectionparameter.getdeclaringclass.php',
    1 => 'ReflectionParameter::getDeclaringClass',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'es',
    'path' => 'reference/reflection/reflectionparameter/getclass.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="reflectionparameter.getclass" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ReflectionParameter::getClass</h1>
  <p class="verinfo">(PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">ReflectionParameter::getClass</span> &mdash; <span class="dc-title">Obtiene un objeto <span class="classname"><a href="class.reflectionclass.php" class="classname">ReflectionClass</a></span> para el parámetro que se está reflejando o <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></p>

 </div>

 <div id="reflectionparameter.getclass-refsynopsisdiv">
  <div class="warning"><strong class="warning">Advertencia</strong><p class="simpara">Esta función está
<em>OBSOLETA</em> a partir de PHP 8.0.0. Depender de esta función
está altamente desaconsejado.</p></div>
 </div>

 <div class="refsect1 description" id="refsect1-reflectionparameter.getclass-description">
  <h3 class="title">Descripción</h3>
  <div class="methodsynopsis dc-description">
   <span class="attribute"><a href="class.deprecated.php">#[\Deprecated]</a> </span><br>
   <span class="modifier">public</span> <span class="methodname"><strong>ReflectionParameter::getClass</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.reflectionclass.php" class="type ReflectionClass">ReflectionClass</a></span></span></div>

  <p class="para rdfs-comment">
   Obtiene un objeto <span class="classname"><a href="class.reflectionclass.php" class="classname">ReflectionClass</a></span> para el parámetro que se está reflejando o <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>.
  </p>
  <p class="para">
   A partir de PHP 8.0.0 esta función está obsoleta y no se recomienda.
   En su lugar, debe utilizarse <span class="methodname"><a href="reflectionparameter.gettype.php" class="methodname">ReflectionParameter::getType()</a></span>
   para obtener la <span class="classname"><a href="class.reflectiontype.php" class="classname">ReflectionType</a></span> de este parámetro
   y luego interrogar este objeto para determinar el tipo del parámetro.
  </p>

  
<div class="warning"><strong class="warning">Advertencia</strong>
<p class="simpara">
 Esta función está actualmente no documentada; solo la lista de sus argumentos está disponible.
</p>
</div>


 </div>


 <div class="refsect1 parameters" id="refsect1-reflectionparameter.getclass-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-reflectionparameter.getclass-returnvalues">
  <h3 class="title">Valores devueltos</h3>
  <p class="para">
   Un objeto <span class="classname"><a href="class.reflectionclass.php" class="classname">ReflectionClass</a></span>, o <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> si no se declara ningún tipo,
   o el tipo declarado no es una clase o interfaz.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-reflectionparameter.getclass-examples">
  <h3 class="title">Ejemplos</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Ejemplo #1 Ejemplo de uso de la clase <span class="classname"><a href="class.reflectionparameter.php" class="classname">ReflectionParameter</a></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">function </span><span style="color: #0000BB">foo</span><span style="color: #007700">(</span><span style="color: #0000BB">Exception $a</span><span style="color: #007700">) { }<br /><br /></span><span style="color: #0000BB">$functionReflection </span><span style="color: #007700">= new </span><span style="color: #0000BB">ReflectionFunction</span><span style="color: #007700">(</span><span style="color: #DD0000">'foo'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$parameters </span><span style="color: #007700">= </span><span style="color: #0000BB">$functionReflection</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getParameters</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">$aParameter </span><span style="color: #007700">= </span><span style="color: #0000BB">$parameters</span><span style="color: #007700">[</span><span style="color: #0000BB">0</span><span style="color: #007700">];<br /><br />echo </span><span style="color: #0000BB">$aParameter</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getClass</span><span style="color: #007700">()-&gt;</span><span style="color: #0000BB">name</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

   </div>
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-reflectionparameter.getclass-changelog">
  <h3 class="title">Historial de cambios</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Versión</th>
      <th>Descripción</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.0.0</td>
      <td>
       Esta función ha sido deprecada en favor de
       <span class="methodname"><a href="reflectionparameter.gettype.php" class="methodname">ReflectionParameter::getType()</a></span>.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 seealso" id="refsect1-reflectionparameter.getclass-seealso">
  <h3 class="title">Ver también</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="methodname"><a href="reflectionparameter.getdeclaringclass.php" class="methodname" rel="rdfs-seeAlso">ReflectionParameter::getDeclaringClass()</a> - Obtiene la clase declarante</span></li>
   </ul>
  </p>
 </div>


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