Installation & Setup

Overview

Slender is an extension of the excellent Slim framework. It provides a few additional utilities to assist with modular application development, while trying to avoid some of the bloat & bootstrapping incurred with some larger frameworks like Zend or Symfony.

Slender extends Slim directly, and as such can be used in exactly the same way.

$app = new Slender\App();
$app->get('/',function() use($app){
    echo 'HELLO WORLD';
}
$app->run();

The Utilities

Broadly speaking, Slender currently provides 2 utilities to help with application development.

Configuration Loader

The Configuration loader provide a mechanism for defining application config in arrays. Multiple configuration files will automatically be merged together. Files can be written as PHP Arrays, YML or JSON.

The configuration loaders also provide several extra config settings to speed things up:

Service definitions

Services & Factories can be defined in config that will be automatically registered to the Dependency Injection container.

Route definitions

HTTP Routes can also be defined in config, and will be automatically registered on application startup.

Modules

Slender has a module system built in to make it easier to load additional functionality into your application while keeping the codebase tidy and managable. The only requirement of a module is a config file, and can be loaded by path (for local modules) or by namespace (for 3rd-party/composer-installed modules). For more information on modules, see the Modules section.