cspray/Auryn — pull request #1 by cspray (2014-05-23 11:04:11+00:00)
Title: Prepare objects with extended class preparers

Adds appropriate test and code to run preparers for the parent class of an object. This allows a dependency setter to be declared on the parent class and will be invoked for all children classes extending from it.

Here's an example use case:

```php
abstract class AppController {

private $doohickey;

function setDoohickey(Doohickey $doohickey) {
$this->doohickey = $doohickey;
}

function getDoohickey() {
$this->doohickey;
}

}

class FooController extends AppController {}
class BarController extends AppController {}

$provider->prepare('AppController', function($controller, $injector) {
$controller->setDoohickey($injector->make('Doohickey'));
});

$foo = $provider->make('FooController'); // $foo->setDoohickey() is called
```