mirror of
https://github.com/grocy/grocy.git
synced 2025-08-17 19:16:37 +00:00
23 lines
520 B
PHP
23 lines
520 B
PHP
<?php
|
|
|
|
namespace Grocy\Controllers;
|
|
|
|
use \Grocy\Services\DatabaseService;
|
|
use \Grocy\Services\ApplicationService;
|
|
|
|
class BaseController
|
|
{
|
|
public function __construct(\Slim\Container $container) {
|
|
$this->AppContainer = $container;
|
|
|
|
$databaseService = new DatabaseService();
|
|
$this->Database = $databaseService->GetDbConnection();
|
|
|
|
$applicationService = new ApplicationService();
|
|
$container->view->set('version', $applicationService->GetInstalledVersion());
|
|
}
|
|
|
|
protected $AppContainer;
|
|
protected $Database;
|
|
}
|