From b8903396199c3437cf980d93c94159a00899a10d Mon Sep 17 00:00:00 2001 From: Laria Carolin Chabowski Date: Sun, 8 Nov 2020 18:04:12 +0100 Subject: Make SITE_BASE_PATH a method of Env This allows us to get rid of utils.php --- ratatoeskr/sys/Env.php | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'ratatoeskr/sys/Env.php') diff --git a/ratatoeskr/sys/Env.php b/ratatoeskr/sys/Env.php index 63d079d..612418e 100644 --- a/ratatoeskr/sys/Env.php +++ b/ratatoeskr/sys/Env.php @@ -43,4 +43,15 @@ class Env return Database::fromConfig($config); }); } + + /** + * The Base path of this ratatoeskr site. + * @return string + */ + public function siteBasePath(): string + { + return $this->lazy("siteBasePath", static function () { + return dirname(dirname(dirname(__FILE__))); + }); + } } -- cgit v1.2.3-70-g09d2