codeguy/Slim — pull request #328 by peters (2012-06-29 16:44:22+00:00)
Title: Support for locals

A nice feature inspired by the express framework on how local variables should be exposed to views and other internal components. This component provides a simple way of doing so.

```

locals('name', function($lastname) {
return "Peter $lastname";
});

$app->get('/hello/:name', function ($name) use($app) {
echo "Hello, " . $app->locals('name', "Sunde"));
});
$app->run();
```