$app = new Illuminate\Container\Container();
$app->bind('app', $app);
$app->instance('log', $log);
$app->bind('MongoLog', 'log');
class A extends SplObjectStorage
{
protected $log;
public function __construct(MongoLog $log)
{
$this->log = $log;
}
}
class B extends A {}
class C extends A {}
$a = $app->make('A');
$b = $app->make('B');
$c = $app->make('C');