Redirect.php
public function route($name = ''){
        $routes = AsCollector::getAs();

        if (isset($routes[$name])) {
            $this->to($routes[$name]);
        }else{
            throw new RouteNotFoundException(sprintf('%s Route Not Found'));
        }
    }
public function route($name = ''){
        $routes = AsCollector::getAs();

        if (isset($routes[$name])) {
            $this->to($routes[$name]);
        }else{
            throw new RouteNotFoundException(sprintf('%s Route Not Found'));
        }
    }
public function route ( $ name = '' ) { $ routes = AsCollector :: getAs ( ) ; if ( isset ( $ routes [ $ name ] ) ) { $ this -> to ( $ routes [ $ name ] ) ; } else { throw new RouteNotFoundException ( sprintf ( '%s Route Not Found' ) ) ; } }
redirect to a route

@param string $name
@throws RouteNotFoundException
redirect to a route