public function roleFetchSubjectRoles(SubjectInterface $subject, $permissions = true)
    {
        $roles = $this->storage->roleFetchSubjectRoles($subject, $permissions);
        if ($permissions) {
            $this->roleLoadPermissions($roles);
        }
        return $roles;
    }
public function roleFetchSubjectRoles(SubjectInterface $subject, $permissions = true)
    {
        $roles = $this->storage->roleFetchSubjectRoles($subject, $permissions);
        if ($permissions) {
            $this->roleLoadPermissions($roles);
        }
        return $roles;
    }
public function roleFetchSubjectRoles ( SubjectInterface $ subject , $ permissions = true ) { $ roles = $ this -> storage -> roleFetchSubjectRoles ( $ subject , $ permissions ) ; if ( $ permissions ) { $ this -> roleLoadPermissions ( $ roles ) ; } return $ roles ; }
Fetch the roles that are associated with the user instance passed in.

@todo cache roles
@param \RBAC\Subject\SubjectInterface $subject Initialized subject instance
@param bool $permissions Load the permission set
@return Role[] Roles the user has assigned
Fetch the roles that are associated with the user instance passed in .