scope = $scope; parent::__construct($scope, $entityManager, $aclManager, $config); $this->init(); } public function inject($name, $object) { $this->injections[$name] = $object; } protected function init() { } protected function getInjection($name) { return $this->injections[$name] ?? $this->$name ?? null; } protected function addDependencyList(array $list) { foreach ($list as $item) { $this->addDependency($item); } } protected function addDependency($name) { $this->dependencyList[] = $name; } public function getDependencyList() { return array_merge($this->dependencyList, $this->dependencies); } }