We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
From the Bootstrap wiki document you can clearly set classes and use $this->getService('dependency.name').
$this->getService('dependency.name')
However, in this case we need dependencies that are local to the Extension itself.
One concept is to have an Extension.php file in each /ext/ folder. This is notably similar to ZF2's Module.php class.
Extension.php
Module.php class
I believe there could be a simple di.php such as Ext/<ExtName>/Config/di.php. It could contain an array such as:
di.php
Ext/<ExtName>/Config/di.php
<?php // $dep['dep.name'] = "\Path\To\Dependency"; $dep['user.auth'] = "\Ext\Users\Auth\User"; $dep['user.entity'] = "\Ext\Users\Entity\User"; // Respectively from the controller you'd be able to do $authClass = $this->getService('user.auth'); $auth = new $authClass(); if($auth->verify($username, $password)) { $entity = $this->getService('user.entity'); $user = new $entity($someUserData); }