diff options
author | Laria Carolin Chabowski <laria@laria.me> | 2020-11-08 18:04:12 +0100 |
---|---|---|
committer | Laria Carolin Chabowski <laria@laria.me> | 2020-11-08 18:04:12 +0100 |
commit | b8903396199c3437cf980d93c94159a00899a10d (patch) | |
tree | a95a91fa43736e0ee7fa1ae89b3a8df10cd0d1f7 /ratatoeskr/sys/Env.php | |
parent | 57efd9a7ae27b2f0bd98382a1f6b107064585f99 (diff) | |
download | ratatoeskr-cms-b8903396199c3437cf980d93c94159a00899a10d.tar.gz ratatoeskr-cms-b8903396199c3437cf980d93c94159a00899a10d.tar.bz2 ratatoeskr-cms-b8903396199c3437cf980d93c94159a00899a10d.zip |
Make SITE_BASE_PATH a method of Env
This allows us to get rid of utils.php
Diffstat (limited to 'ratatoeskr/sys/Env.php')
-rw-r--r-- | ratatoeskr/sys/Env.php | 11 |
1 files changed, 11 insertions, 0 deletions
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__))); + }); + } } |