Update 'src/Routes/RouteCollection.php'

This commit is contained in:
ahwelp
2019-04-29 14:14:43 +00:00
parent 77db56b830
commit e1c61897e3
+17
View File
@@ -185,6 +185,23 @@ class RouteCollection {
return $route; return $route;
} }
/**
*
*/
static function cli($uri, $callback, $weight = 0) {
$route = new Route();
$route->_verb[] = 'CLI';
$route->_uri = $uri;
$route->_callback[] = $callback;
$route->_weight = $weight;
$route->prepare();
self::getInstance()->_routes[] = $route;
return $route;
}
/** /**
* *
*/ */