Identity/RoleSecurityIdentity.php
public static function fromAccount($role)
    {
        return $role instanceof RoleInterface
            ? new self(ClassUtils::getClass($role), $role->getName())
            : new self('role', $role);
    }
public static function fromAccount($role)
    {
        return $role instanceof RoleInterface
            ? new self(ClassUtils::getClass($role), $role->getName())
            : new self('role', $role);
    }
public static function fromAccount ( $ role ) { return $ role instanceof RoleInterface ? new self ( ClassUtils :: getClass ( $ role ) , $ role -> getName ( ) ) : new self ( 'role' , $ role ) ; }
Creates a role security identity from a RoleInterface.

@param RoleInterface|string $role The role

@return self
Creates a role security identity from a RoleInterface .