ZfcRbac\Service\RoleService::flattenRoles PHP Метод

flattenRoles() защищенный Метод

This method iterates through the list of roles, and convert any RoleInterface to a string. For any role, it also extracts all the children
protected flattenRoles ( array $roles ) : string[]
$roles array
Результат string[]
    protected function flattenRoles(array $roles)
    {
        $roleNames = [];
        $iterator = $this->traversalStrategy->getRolesIterator($roles);
        foreach ($iterator as $role) {
            $roleNames[] = $role->getName();
        }
        return array_unique($roleNames);
    }