Documentation | Github | Installation

Exedra

A multitier nestful route oriented PHP microframework, shipped with a flexibility that let you design, plan and prototype your application and execution hierarchically through the map of routing.

What's Exedra?

Nestful Routing
Write a routing beneath another route. Hierarchically design your application based on a nestable/groupable level of routing.
Route Oriented
From writing how your application may behave, to querying back the route for url generation, to hierarchically design your application, to binding your middleware on any node of your route.
Adaptive and flexible
Write and use your own handler, design your own routing component(s). Or customize your very own application structure.
Near-zero convention and configuration
There're still a configuration, and convention. But too little are required just to have your application running.
Fast
It's fast. Designed with minimum architecture in mind, without sacrificing the extensibility very much.
Contextual
Codes live in their context. Nothing is outworldy unless specified.

Sneak peak

Default routing

$app->map->addRoutes(array(
  'person' => array(
      'method' => 'any',
      'path' => '/persons',
      'subroutes' => array(
        'list' => array(
            'method' => 'get',
            'path' => '/',
            'execute' => 'controller=Person@index'
        )
      )
    )
));
Convenient Routing

$app->map->any('/books')->group(function($group)
{
    $group->get('/', 'controller=Book@index')
      ->tag('bookList');

    $group->get('/[:id]')
      ->execute('controller=Book@view');
});
URL Generator

// absolute route
echo $exe->url->route('@person.list');

// search tagged route
echo $exe->url->route('#bookList');
Creating a view

$view = $exe->view->create('book/list');

$view->set('title', 'List of books');
$view->set('authors', $authors);

echo $view->render();
Form

echo $exe->form->text('bookTitle')
      ->attr('class="form-control"');

echo $exe->form->select('gender')
      ->setOptions(array('male', 'female'));
Path handling

$file = $exe->path->file('Logs/message.log');

// get contents
$contents = $file->getContents();

// put contents
$file->putContents('message from mars');
Session

// dot notation based session
$exe->session->set('facebook.token', $token);
$exe->session->set('facebook.perms', $perms);

// array of token, permissions
$facebookData = $exe->session->get('facebook');

// delete array of 'facebook' session data
$exe->session->destroy('facebook');