ox / router
Ox Router
This package's canonical repository appears to be gone and the package has been frozen as a result.
v1.6
2016-05-20 07:42 UTC
Requires
- php: >=5.5.9
- filp/whoops: ~2.0
- monolog/monolog: ~1
- symfony/http-kernel: ~3.0
This package is not auto-updated.
Last update: 2022-03-30 11:57:22 UTC
README
Current Build Status
Router
Router::addGroupMiddleware("clientLocal", array(
"Auth" => array("status" => "client"),
"Domain" => array("hostname" => "localhost"),
),
array("ToJson"=>array())
);
Router::rout("/login")->app("login")->save();
Router::rout("/get")->method("GET")->app("login")->save();
Router::setMiddlewareGroup("clientLocal",function(){
Router::rout("/")->app("index")->save();
Router::rout("/order/:num=>id")->app("order")->save();
Router::rout("/files/:img")->app("image")->save();
Router::rout("/uploads/:img")->app("image")->middleware("Domain",array("hostname"=>"other.dev")->save();
});
Controller:
DIR: OxApp/controllers
Namespace: \OxApp\controllers
NameController extends \Ox\App
Middleware:
DIR: OxApp/middleware
Namespace - \OxApp\middleware
public function rules($rule=array())