Move the global functions to a closure 

Hi Ryan Weaver, 

Nice work on the Kumbaya framework. I would like a few changes, which can bring much more better things than global functions, and slowly moving the views from the controller.

The idea is to follow "refactoring to architectural change" : https://github.com/auraphp/Aura.Dispatcher#refactoring-to-architecture-changes . I don't know if there is some better component out there to do with other than aura.

Somethings I don't know are 

1. How to make a lazy object via pimple.

Eg : 

```php
<?php
class AttendeesController
{
    protected $pdo;
    
    protected $request;
    
    public function function(Request $request, PDO $pdo) 
    {
        $this->pdo = $pdo;
        $this->request = $request;
    }
    
    public function __invoke()
    {
        $sql = 'SELECT * FROM php_camp';
        $content = '<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" />';
        $content .= '<h1>PHP Camp Attendees</h1>';
        $content .= '<table class="table" style="width: 300px;">';
        foreach ($pdo->query($sql) as $row) {
            $content .= sprintf(
                '<tr><td style="font-size: 24px;">%s</td><td><img src="%s" height="120" /></td></tr>',
                $row['attendee'],
                $row['avatar_url']
            );
        }
        $content .= '</table>';

        return new Response($content);
    }
}
```

```php
<?php
$dispatcher->setObject('attendees_controller', $c['AttendeesController']);
```

I don't need to instantiate the object of `AttendeesController` when setting the object. Is there a way in Pimple ?

In that case I would like to move all the closures to a class and may a folder `controllers`.

What do you think?

Thank you.