mirror of
https://github.com/fruithost/Panel.git
synced 2026-11-09 05:26:28 +09:00
basic skeleton of control panel
This commit is contained in:
1 parent
399e634a79
commit
5effea0c0c
92 files changed
+68296
No files matched your search
@@ -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);
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in new issue
Block a user