コード例 #1
0
ファイル: SwitchUserRole.php プロジェクト: notbrain/symfony
 /**
  * Constructor.
  *
  * @param string         $role   The role as a string
  * @param TokenInterface $source The original token
  */
 public function __construct($role, TokenInterface $source)
 {
     parent::__construct($role);
     $this->source = $source;
 }
コード例 #2
0
ファイル: RoleTest.php プロジェクト: notbrain/symfony
 public function testGetRole()
 {
     $role = new Role('FOO');
     $this->assertEquals('FOO', $role->getRole());
 }