basic skeleton of control panel

This commit is contained in:
Adrian Preuß committed 2019-04-07 16:08:17 +02:00
1 parent 399e634a79
commit 5effea0c0c
92 files changed
+68296

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
<?php
namespace fruithost;
class Modules {
private $core = null;
private $modules = [];
public function __construct($core) {
$this->core = $core;
foreach(new \DirectoryIterator($this->getPath()) AS $info) {
if($info->isDot()) {
continue;
}
$this->addModule(new Module(sprintf('%s%s%s', $this->getPath(), DS, $info->getFilename())));
}
}
public function getPath() {
return sprintf('%s%s%s', dirname(PATH), DS, 'modules');
}
public function addModule($module) {
$this->modules[] = $module->init($this->core);
}
}
?>