From 9611f0b78fc1f647b27e12594da0b263b8893d82 Mon Sep 17 00:00:00 2001 From: Norbert Wagner Date: Tue, 4 May 2021 17:53:20 +0200 Subject: [PATCH] make appPath() read/write --- src/Settings.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Settings.php b/src/Settings.php index b663713..c1cd56a 100644 --- a/src/Settings.php +++ b/src/Settings.php @@ -65,8 +65,10 @@ class Settings implements \Iterator * If the package path is not set, it is set to the appPath * @param string $path *///}}} - public function appPath( string $path ) + public function appPath( ?string $path=null ) { + if (! isset($path)) return $this->appPath; + if ($this->pkgPath === $this->appPath) $this->pkgPath = $path; $this->appPath = $path; return $this; @@ -204,7 +206,7 @@ class Settings implements \Iterator // create() {{{ /** {{{ - * Creates a copy of the Settingsobject without the Settings + * Creates a copy of the Settingsobject without the configuration directives * *///}}} public function create( ?array $settings=null )