src/Router/RouteCollector/CachedCollector.php
public function getData()
    {
        $cache = new ConfigCache($this->cacheFile, $this->debug);
        if (!$cache->isFresh()) {
            $routes = $this->wrappedCollector->getData();

            // TODO: This seems a fragile way to handle this
            if (!$this->isCacheable($routes)) {
                return $routes;
            }

            $cache->write('<?php return '.var_export($routes, true).';');
        }

        return require $cache;
    }
public function getData()
    {
        $cache = new ConfigCache($this->cacheFile, $this->debug);
        if (!$cache->isFresh()) {
            $routes = $this->wrappedCollector->getData();

            // TODO: This seems a fragile way to handle this
            if (!$this->isCacheable($routes)) {
                return $routes;
            }

            $cache->write('<?php return '.var_export($routes, true).';');
        }

        return require $cache;
    }
public function getData ( ) { $ cache = new ConfigCache ( $ this -> cacheFile , $ this -> debug ) ; if ( ! $ cache -> isFresh ( ) ) { $ routes = $ this -> wrappedCollector -> getData ( ) ; // TODO: This seems a fragile way to handle this if ( ! $ this -> isCacheable ( $ routes ) ) { return $ routes ; } $ cache -> write ( '<?php return ' . var_export ( $ routes , true ) . ';' ) ; } return require $ cache ; }
Returns the collected route data

@return array
Returns the collected route data