예제 #1
0
 /**
  * Returns the roles granted to the user.
  *
  * <code>
  * public function getRoles()
  * {
  *     return array('ROLE_USER');
  * }
  * </code>
  *
  * Alternatively, the roles might be stored on a ``roles`` property,
  * and populated in any number of different ways when the user object
  * is created.
  *
  * @return Role[] The user roles
  */
 public function getRoles()
 {
     return array($this->role->getRole());
 }