Example #1
0
 /**
  * Loads the routes into a collection.
  *
  * Loads the resources from cache if the cache is still valid, or re-loads
  * and re-creates the cache if neccessary.
  *
  * @return RouteCollectionInterface
  */
 public function load(RouteLoaderInterface $loader, $forceValidate = false)
 {
     if (!$this->isValid($forceValidate)) {
         $loader->addListener($this);
         $this->doLoadResources($loader, $forceValidate);
         $loader->removeListener($this);
     }
     return $this->storage->read();
 }