reformo / rslim
This package is abandoned and no longer maintained.
No replacement package was suggested.
Basically Slim but based on convention over configuration.
README
Basically Slim but based on convention over configuration.
Installation
It's recommended that you use Composer to install RSlim.
$ composer require --prefer-dist reformo/rslim "1.*"
This will install RSlim and all required dependencies. RSlim requires PHP 5.5.0 or newer. slim/slim and twig/twig packages..
Usage
See also example folder organization
$config =[
'base_dir' => dirname(dirname(__DIR__)),
'base_url' => 'http://www.reformo.dev',
'app_name' => basename(__DIR__),
'app_dir' => 'path/to/app/dir'
'app'=>[
'debug' => 1,
'timezone' => 'Europe/Istanbul'
]
];
$RSlim = new \RSlim\RSlim($config);
/*
$RSlim->register($request_method, $route, $controller, $return_type);
*/
$RSlim->register("get", '/', 'app/main');
$RSlim->register("get", "/hello", "app/hello");
$RSlim->register("post", "/hello", "app/hello.post");
$RSlim->register("get", "/hello/{name}", "app/hello_name", "json");
$RSlim->run();
Contribute
- Open issue if found bugs or sent pull request.
- Feel free to ask if have any questions.