<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/book.reflection.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'class.reflectionattribute.php',
    1 => 'ReflectionAttribute',
    2 => 'The ReflectionAttribute class',
  ),
  'up' => 
  array (
    0 => 'book.reflection.php',
    1 => 'Reflection',
  ),
  'prev' => 
  array (
    0 => 'reflectionreference.getid.php',
    1 => 'ReflectionReference::getId',
  ),
  'next' => 
  array (
    0 => 'reflectionattribute.construct.php',
    1 => 'ReflectionAttribute::__construct',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/reflection/reflectionattribute.xml',
  ),
  'history' => 
  array (
  ),
  'extra_header_links' => 
  array (
    'rel' => 'alternate',
    'href' => '/manual/en/feeds/class.reflectionattribute.atom',
    'type' => 'application/atom+xml',
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="class.reflectionattribute" class="reference">

 <h1 class="title">The ReflectionAttribute class</h1>
 

 <div class="partintro"><p class="verinfo">(PHP 8)</p>


  <div class="section" id="reflectionattribute.intro">
   <h2 class="title">Introduction</h2>
   <p class="para">
    The <span class="classname"><strong class="classname">ReflectionAttribute</strong></span> class provides information about
    an <a href="language.attributes.php" class="link">Attribute</a>.
   </p>
  </div>


  <div class="section" id="reflectionattribute.synopsis">
   <h2 class="title">Class synopsis</h2>


   <div class="classsynopsis"><div class="classsynopsisinfo">
    
     <span class="modifier">class</span> <strong class="classname"><strong class="classname">ReflectionAttribute</strong></strong>
    

    
     <span class="modifier">implements</span>
      <a href="class.reflector.php" class="interfacename">Reflector</a> {</div>

    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Constants */</div>
    <div class="fieldsynopsis">
     <span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      <var class="fieldsynopsis_varname"><a href="class.reflectionattribute.php#reflectionattribute.constants.is-instanceof"><var class="varname">IS_INSTANCEOF</var></a></var>;</div>


    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Properties */</div>
    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
      <var class="varname"><a href="class.reflectionattribute.php#reflectionattribute.props.name">$<var class="varname">name</var></a></var>;</div>


    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Methods */</div>
    <div class="constructorsynopsis dc-description">
   <span class="modifier">private</span> <span class="methodname"><a href="reflectionattribute.construct.php" class="methodname">__construct</a></span>()</div>

    <div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="reflectionattribute.getarguments.php" class="methodname">getArguments</a></span>(): <span class="type"><a href="language.types.array.php" class="type array">array</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="reflectionattribute.getname.php" class="methodname">getName</a></span>(): <span class="type"><a href="language.types.string.php" class="type string">string</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="reflectionattribute.gettarget.php" class="methodname">getTarget</a></span>(): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="reflectionattribute.isrepeated.php" class="methodname">isRepeated</a></span>(): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="reflectionattribute.newinstance.php" class="methodname">newInstance</a></span>(): <span class="type"><a href="language.types.object.php" class="type object">object</a></span></div>

   }</div>


  </div>

  <div class="section" id="reflectionattribute.props">
   <h2 class="title">Properties</h2>
   <dl>
    
     <dt id="reflectionattribute.props.name"><var class="varname">name</var></dt>
     <dd>
      <span class="simpara">
       The name of the attribute.
      </span>
     </dd>
    
   </dl>
  </div>

  
  <div class="section" id="reflectionattribute.constants">
   <h2 class="title">Predefined Constants</h2>
   <div class="section" id="reflectionattribute.constants.flags">
    <h2 class="title">ReflectionAttribute Flags</h2>
    <dl>

     
      <dt id="reflectionattribute.constants.is-instanceof">
       <strong><code><a href="class.reflectionattribute.php#reflectionattribute.constants.is-instanceof">ReflectionAttribute::IS_INSTANCEOF</a></code></strong>
       <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      </dt>
      <dd>
       <p class="para">
        Retrieve attributes using an
        <code class="parameter">instanceof</code> check.
       </p>
      </dd>
     

    </dl>
    <blockquote class="note"><p><strong class="note">Note</strong>: 
     <p class="para">
      The values of these constants may change between PHP versions.
      It is recommended to always use the constants
      and not rely on the values directly.
     </p>
    </p></blockquote>
   </div>
  </div>
  

  <div class="section">
   <h2 class="title">Changelog</h2>
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>Version</th>
       <th>Description</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>8.4.0</td>
       <td>
        All class constants are now typed.
       </td>
      </tr>

      <tr>
       <td>8.4.0</td>
       <td>
        Added <span class="property"><a href="class.reflectionattribute.php#reflectionattribute.props.name">ReflectionAttribute::$name</a></span>.
       </td>
      </tr>

     </tbody>
    
   </table>

  </div>

 </div>

 






























<h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li><a href="reflectionattribute.construct.php">ReflectionAttribute::__construct</a> — Private constructor to disallow direct instantiation</li><li><a href="reflectionattribute.getarguments.php">ReflectionAttribute::getArguments</a> — Gets arguments passed to attribute</li><li><a href="reflectionattribute.getname.php">ReflectionAttribute::getName</a> — Gets attribute name</li><li><a href="reflectionattribute.gettarget.php">ReflectionAttribute::getTarget</a> — Returns the target of the attribute as bitmask</li><li><a href="reflectionattribute.isrepeated.php">ReflectionAttribute::isRepeated</a> — Returns whether the attribute of this name has been repeated on a code element</li><li><a href="reflectionattribute.newinstance.php">ReflectionAttribute::newInstance</a> — Instantiates the attribute class represented by this ReflectionAttribute class and arguments</li></ul>
</div>
<?php manual_footer($setup); ?>