Skip to content

Commit 93cc19e

Browse files
authored
Add list of attribute target constants
I think the constant names are self-explanatory enough to not require additional information Closes GH-1168.
1 parent 766f190 commit 93cc19e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

language/attributes.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,18 @@ class MyAttribute
333333
</para>
334334
</example>
335335

336+
<para>The following targets can be specified:</para>
337+
338+
<simplelist>
339+
<member><constant>Attribute::TARGET_CLASS</constant></member>
340+
<member><constant>Attribute::TARGET_FUNCTION</constant></member>
341+
<member><constant>Attribute::TARGET_METHOD</constant></member>
342+
<member><constant>Attribute::TARGET_PROPERTY</constant></member>
343+
<member><constant>Attribute::TARGET_CLASS_CONSTANT</constant></member>
344+
<member><constant>Attribute::TARGET_PARAMETER</constant></member>
345+
<member><constant>Attribute::TARGET_ALL</constant></member>
346+
</simplelist>
347+
336348
<para>
337349
By default an attribute can only be used once per declaration. If the attribute should be repeatable on declarations it must
338350
be specified as part of the bitmask to the <literal>#[Attribute]</literal> declaration.

0 commit comments

Comments
 (0)