This commit is contained in:
Yuri Kuznetsov
2014-01-17 17:49:58 +02:00
parent e5f9d1245e
commit 596e59d667
12 changed files with 158 additions and 151 deletions
+2 -5
View File
@@ -12,14 +12,11 @@ abstract class Base
private $container;
private $serviceFactory;
public static $defaultAction = 'index';
public function __construct(Container $container, ServiceFactory $serviceFactory)
public function __construct(Container $container)
{
$this->container = $container;
$this->serviceFactory = $serviceFactory;
if (empty($this->name)) {
$name = get_class($this);
@@ -64,7 +61,7 @@ abstract class Base
protected function getServiceFactory()
{
return $this->serviceFactory;
return $this->container->get('serviceFactory');
}
protected function getService($className)