rdlowrey/Auryn — pull request #62 by cspray (2014-05-23 11:07:08+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
```