Files
grocy/controllers/BaseController.php

23 lines
520 B
PHP
Raw Normal View History

2018-04-11 19:49:35 +02:00
<?php
namespace Grocy\Controllers;
2018-04-12 21:13:38 +02:00
use \Grocy\Services\DatabaseService;
use \Grocy\Services\ApplicationService;
2018-04-11 19:49:35 +02:00
class BaseController
{
public function __construct(\Slim\Container $container) {
$this->AppContainer = $container;
$databaseService = new DatabaseService();
$this->Database = $databaseService->GetDbConnection();
2018-04-12 21:13:38 +02:00
$applicationService = new ApplicationService();
$container->view->set('version', $applicationService->GetInstalledVersion());
2018-04-11 19:49:35 +02:00
}
protected $AppContainer;
protected $Database;
}