diff --git a/Module/InfoManager.php b/Module/InfoManager.php index d0ad53b61..ecc436153 100644 --- a/Module/InfoManager.php +++ b/Module/InfoManager.php @@ -60,12 +60,16 @@ class InfoManager * @author Dennis Eichhorn */ public function __construct(string $module) + { + $this->path = $path; + } + + public function load() { if (($path = realpath($oldPath = ModuleAbstract::MODULE_PATH . '/' . $module . '/info.json')) === false || Validator::startsWith($path, ModuleAbstract::MODULE_PATH)) { throw new PathException($oldPath); } - $this->path = $path; $this->info = json_decode(file_get_contents($this->path), true); } @@ -111,4 +115,34 @@ class InfoManager { return $this->info; } + + public function getInternalName() : string + { + return $this->info['name']['internal']; + } + + public function getDependencies() : string + { + return $this->info['dependencies']; + } + + public function getProviding() : string + { + return $this->info['providing']; + } + + public function getDirectory() : string + { + return $this->info['directory']; + } + + public function getVersion() : string + { + return $this->info['version']; + } + + public function getLoad() : string + { + return $this->info['load']; + } }