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

+55
View File
@@ -0,0 +1,55 @@
<?php
namespace fruithost;
class ModuleInterface {
private $core = null;
public function __construct($core) {
$this->core = $core;
$this->init();
}
protected function init() {
/* Override Me */
}
public function getCore() {
return $this->core;
}
/* Filter */
public function addFilter($name, $method, $priority = 10) {
return $this->core->getHooks()->addFilter($name, $method, $priority);
}
public function removeFilter($name, $method, $priority = 10) {
return $this->core->getHooks()->removeFilter($name, $method, $priority);
}
public function hasFilter($name, $method = false) {
return $this->core->getHooks()->hasFilter($name, $method);
}
public function applyFilter($name, $arguments) {
return $this->core->getHooks()->applyFilter($name, $arguments);
}
/* Actions */
public function addAction($name, $method, $priority = 10) {
return $this->core->getHooks()->addAction($name, $method, $priority);
}
public function removeAction($name, $method, $priority = 10) {
return $this->core->getHooks()->removeAction($name, $method, $priority);
}
public function hasAction($name, $method = false) {
return $this->core->getHooks()->hasAction($name, $method);
}
public function runAction($name, $arguments) {
return $this->core->getHooks()->runAction($name, $arguments);
}
}
?>