reformo/rslim

This package is abandoned and no longer maintained. No replacement package was suggested.

Basically Slim but based on convention over configuration.

1.2.12 2016-05-12 08:13 UTC

This package is auto-updated.

Last update: 2018-10-16 22:57:11 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License

Scrutinizer Code Quality Build Status Codacy Badge Code Climate

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.