Reorganize project part 2

This commit is contained in:
Bernd Bestel
2018-04-11 19:49:35 +02:00
parent bcd5092427
commit 79b4bad014
54 changed files with 1985 additions and 826 deletions

View File

@@ -1,26 +1,28 @@
<?php
class ApplicationService
namespace Grocy\Services;
class ApplicationService extends BaseService
{
/**
* @return boolean
*/
public static function IsDemoInstallation()
public function IsDemoInstallation()
{
return file_exists(__DIR__ . '/../data/demo.txt');
}
private static $InstalledVersion;
private $InstalledVersion;
/**
* @return string
*/
public static function GetInstalledVersion()
public function GetInstalledVersion()
{
if (self::$InstalledVersion == null)
if ($this->InstalledVersion == null)
{
self::$InstalledVersion = preg_replace("/\r|\n/", '', file_get_contents(__DIR__ . '/../version.txt'));
$this->InstalledVersion = preg_replace("/\r|\n/", '', file_get_contents(__DIR__ . '/../version.txt'));
}
return self::$InstalledVersion;
return $this->InstalledVersion;
}
}