addCachedRoute() public method

Add a cached route.
public addCachedRoute ( Route $route )
$route Route
Example #1
0
 /**
  * Re-build a Route object from data that has been var_export-ed.
  *
  * @param  array $data
  *
  * @return static
  */
 public static function __set_state($data)
 {
     $route = new static($data['methods'], $data['pattern'], $data['controller'], $data['name'], $data['options']);
     if (static::$router !== null) {
         static::$router->addCachedRoute($route);
     }
     return $route;
 }