sergiors/lullaby

Configuration for Silex like Symfony

3.0.0 2016-12-01 18:30 UTC

This package is not auto-updated.

Last update: 2024-12-21 20:24:49 UTC


README

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