Skip to content

Instantly share code, notes, and snippets.

View Sander-Toonen's full-sized avatar

Sander Toonen Sander-Toonen

  • IB the data company
  • Eindhoven
View GitHub Profile
<?php
declare(strict_types=1);
namespace App\Command;
use Spatie\ArrayToXml\ArrayToXml;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
@Sander-Toonen
Sander-Toonen / gist:1e03b4e729bc1d3c982d
Last active August 29, 2015 14:18
ReversedRoleHierarchy for getting all parent roles that lead to a specific role.
<?php
use Symfony\Component\Security\Core\Role\RoleHierarchy;
use Symfony\Component\Security\Core\Role\Role;
/**
* ReversedRoleHierarchy defines a reversed role hierarchy.
*
* @author Sander Toonen <s.toonen@gmail.com>
*/