-
Couldn't load subscription status.
- Fork 12
@Enum
JonathanO edited this page Jun 2, 2012
·
1 revision
Used on a static property which must be initialised as an array. This allows use of the array as an "enum" in annotation parameters.
- name (string) The Enum's name (defaults to the property name)
<?
/**
* @Annotation
*/
class Foo {
/**
* @Enum("Id")
*/
public static $enumId = array( "HELLO" => 1, "GOODBYE" => 2 );This would allow use of "Foo.Id.HELLO" as a value in parameter for an annotation:
@Foo(blah=Foo.Id.HELLO)