/** * Check Modules */ private function checkModules() { $plugins = $this->getPlugins(); $out = ""; $id = $this->getInputString("id"); include_once "modules/Dashboard/Abstraction.php"; $abs = new Abstraction(); print $abs->checkForModuleUpdate($id); }
public function __construct($token, array $options = array()) { parent::__construct($token); $this->options = $options + $this->options; // normalize var name e.g. from 'term:1' becomes 'term' $name = $token; if ($options['modifier'] === ':') { $name = substr($name, 0, strpos($name, $options['modifier'])); } $this->name = $name; }
public function request() { parent::request(); $this->getImplementor()->doAnything(); }
} class Abstraction { private $bridge; public function __construct(IBridge $implement) { $this->bridge = $implement; } public function OperationImp() : string { return 'Abstraction <<< BRIDGE >>> ' . $this->bridge->OperationImp() . "\n"; } } class ImplementationA implements IBridge { public function OperationImp() : string { return 'Implementation A'; } } class ImplementationB implements IBridge { public function OperationImp() : string { return 'Implementation B'; } } $abstraction = new Abstraction(new ImplementationA()); echo $abstraction->OperationImp(); $abstraction = new Abstraction(new ImplementationB()); echo $abstraction->OperationImp();
public function doSomething(Abstraction $abstraction) { return $abstraction->operation(); }
public function __construct(Implementor $implemnentor) { parent::__construct($implemnentor); }