original_string: private function getRouteRoles()
      {
          $router = $this->router;
  
          $cache = $this->getConfigCacheFactory()->cache(
              $this->options['cache_dir'].'/tenside_roles.php',
              function (ConfigCacheInterface $cache) use ($router) {
                  $routes = $router->getRouteCollection();
                  $roles  = [];
                  foreach ($routes as $name => $route) {
                      if ($requiredRole = $route->getOption('required_role')) {
                          $roles[$name] = $requiredRole;
                      }
                  }
  
                  $cache->write('<?php return ' . var_export($roles, true) . ';', $routes->getResources());
              }
          );
  
          return require_once $cache->getPath();
      }
code: private function getRouteRoles()
      {
          $router = $this->router;
  
          $cache = $this->getConfigCacheFactory()->cache(
              $this->options['cache_dir'].'/tenside_roles.php',
              function (ConfigCacheInterface $cache) use ($router) {
                  $routes = $router->getRouteCollection();
                  $roles  = [];
                  foreach ($routes as $name => $route) {
                      if ($requiredRole = $route->getOption('required_role')) {
                          $roles[$name] = $requiredRole;
                      }
                  }
  
                  $cache->write('<?php return ' . var_export($roles, true) . ';', $routes->getResources());
              }
          );
  
          return require_once $cache->getPath();
      }
code_tokens: private function getRouteRoles ( ) { $ router = $ this -> router ; $ cache = $ this -> getConfigCacheFactory ( ) -> cache ( $ this -> options [ 'cache_dir' ] . '/tenside_roles.php' , function ( ConfigCacheInterface $ cache ) use ( $ router ) { $ routes = $ router -> getRouteCollection ( ) ; $ roles = [ ] ; foreach ( $ routes as $ name => $ route ) { if ( $ requiredRole = $ route -> getOption ( 'required_role' ) ) { $ roles [ $ name ] = $ requiredRole ; } } $ cache -> write ( '<?php return ' . var_export ( $ roles , true ) . ';' , $ routes -> getResources ( ) ) ; } ) ; return require_once $ cache -> getPath ( ) ; }
docstring: Get the required roles from cache if possible.
  
  @return array
docstring_tokens: Get the required roles from cache if possible .