sergiors / lullaby

Configuration for Silex like Symfony

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lullaby

Lullaby is a layer on Silex\Application, it adds a better way to organize your project, like Symfony framework.

Install

composer require sergiors/lullaby "dev-master"

How to use

Something like this

namespace Acme\Acme\Apps\Fluffy;

use Sergiors\Lullaby\Application\Application;

class Fluffy extends Application
{
}
namespace Acme\Acme;

use Sergiors\Lullaby\Kernel;

class AppKernel extends Kernel
{
    public function registerApps()
    {
        return [
            new Fluffy()
        ];
    }
    
    public function registerProviders()
    {
        return [];
    }
}

In your index file

$env = 'dev';
$debug = false;
$rootDir = __DIR__;

$app = new Acme\Acme\AppKernel($env, $debug, $rootDir);
$app->run();

License

MIT

About

Configuration for Silex like Symfony

License:MIT License


Languages

Language:PHP 100.0%