| @@ 11-31 (lines=21) @@ | ||
| 8 | /** |
|
| 9 | * Base Task Controller. |
|
| 10 | */ |
|
| 11 | abstract class BaseTask extends BaseController |
|
| 12 | { |
|
| 13 | /** |
|
| 14 | * @param \Slim\Container $container |
|
| 15 | */ |
|
| 16 | public function __construct(\Slim\Container $container) |
|
| 17 | { |
|
| 18 | $this->logger = $container->get('logger'); |
|
| 19 | $this->database = $container->get('db'); |
|
| 20 | } |
|
| 21 | ||
| 22 | /** |
|
| 23 | * @return TaskService |
|
| 24 | */ |
|
| 25 | protected function getTaskService() |
|
| 26 | { |
|
| 27 | $service = new TaskService($this->database); |
|
| 28 | ||
| 29 | return $service; |
|
| 30 | } |
|
| 31 | } |
|
| 32 | ||
| @@ 11-31 (lines=21) @@ | ||
| 8 | /** |
|
| 9 | * Base User Controller. |
|
| 10 | */ |
|
| 11 | abstract class BaseUser extends BaseController |
|
| 12 | { |
|
| 13 | /** |
|
| 14 | * @param \Slim\Container $container |
|
| 15 | */ |
|
| 16 | public function __construct(\Slim\Container $container) |
|
| 17 | { |
|
| 18 | $this->logger = $container->get('logger'); |
|
| 19 | $this->database = $container->get('db'); |
|
| 20 | } |
|
| 21 | ||
| 22 | /** |
|
| 23 | * @return UserService |
|
| 24 | */ |
|
| 25 | protected function getUserService() |
|
| 26 | { |
|
| 27 | $service = new UserService($this->database); |
|
| 28 | ||
| 29 | return $service; |
|
| 30 | } |
|
| 31 | } |
|
| 32 | ||