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:
Eric Stern 2021-12-02 14:01:16 -08:00 committed by GitHub
parent 766f190db3
commit 93cc19efef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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.