mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 08:28:54 +00:00
Add list of attribute target constants
I think the constant names are self-explanatory enough to not require additional information Closes GH-1168.
This commit is contained in:
parent
766f190db3
commit
93cc19efef
1 changed files with 12 additions and 0 deletions
|
@ -333,6 +333,18 @@ class MyAttribute
|
|||
</para>
|
||||
</example>
|
||||
|
||||
<para>The following targets can be specified:</para>
|
||||
|
||||
<simplelist>
|
||||
<member><constant>Attribute::TARGET_CLASS</constant></member>
|
||||
<member><constant>Attribute::TARGET_FUNCTION</constant></member>
|
||||
<member><constant>Attribute::TARGET_METHOD</constant></member>
|
||||
<member><constant>Attribute::TARGET_PROPERTY</constant></member>
|
||||
<member><constant>Attribute::TARGET_CLASS_CONSTANT</constant></member>
|
||||
<member><constant>Attribute::TARGET_PARAMETER</constant></member>
|
||||
<member><constant>Attribute::TARGET_ALL</constant></member>
|
||||
</simplelist>
|
||||
|
||||
<para>
|
||||
By default an attribute can only be used once per declaration. If the attribute should be repeatable on declarations it must
|
||||
be specified as part of the bitmask to the <literal>#[Attribute]</literal> declaration.
|
||||
|
|
Loading…
Reference in a new issue