tanakahisateru/pinoco — Issue #53: Delegation support
Author: tanakahisateru
Created: 2012-02-22 09:59:18+00:00
State: open
Labels: enhancement

```php
request->post->get('param1');
$this->error(404);
}
}

$actions = new MyActions(Pinoco::instance()); // setting target object
$actions->foo(); // it can respond own method
$actions->redirect('/'); // also can call target object's method
```

```php
registerDelegate(Pinoco::instance());
$actions->registerAsMethod('foo', function() {
// regular usage of closure based method extension
});

$actions->foo(); // it can respond own method
$actions->redirect('/'); // also can call target object's method
```

This feature is related to routing enhancement #51 .