title: how to access class variables and constants in annotation in symfony 2 php
body: <p>I have a class like this:</p>
  
  <pre><code>class Student {
  
  const GENDER_MALE = "male", GENDER_FEMALE = "female";
  /**
   * @var string $gender
   *
   * @ORM\Column(name="gender", type="string", length=50,nullable=false)
   * @Assert\NotBlank(message="Gender cannot be blank",groups={"new"})
   * @Assert\Choice(choices = {"male", "female"}, message = "Choose a valid gender.", groups={"new"})
   */
  private $gender;
  </code></pre>
  
  <p>I have to hard code the values <code>"male"</code> and <code>"female"</code>. Is it possible to do something like this ? </p>
  
  <blockquote>
    <p>choices = {self::GENDER_MALE, self::GENDER_FEMALE} </p>
  </blockquote>