From 754ea98fb25d5ad210263edf923573f7893d7418 Mon Sep 17 00:00:00 2001 From: Dominik Liebler Date: Wed, 11 Sep 2013 16:28:06 +0200 Subject: [PATCH] cs Facade --- Facade/BiosInterface.php | 31 +++++++++++++++++++++++++++++++ Facade/Facade.php | 30 ++++++++++++++++++++---------- Facade/OsInterface.php | 14 ++++++++++++++ 3 files changed, 65 insertions(+), 10 deletions(-) create mode 100644 Facade/BiosInterface.php create mode 100644 Facade/OsInterface.php diff --git a/Facade/BiosInterface.php b/Facade/BiosInterface.php new file mode 100644 index 0000000..377651c --- /dev/null +++ b/Facade/BiosInterface.php @@ -0,0 +1,31 @@ +bios = $bios; - $this->opsys = $os; + $this->os = $os; } + /** + * turn on the system + */ public function turnOn() { $this->bios->execute(); $this->bios->waitForKeyPress(); - $this->bios->launch($this->opsys); + $this->bios->launch($this->os); } + /** + * turn off the system + */ public function turnOff() { - $this->opsys->halt(); + $this->os->halt(); $this->bios->powerDown(); } - -} \ No newline at end of file +} diff --git a/Facade/OsInterface.php b/Facade/OsInterface.php new file mode 100644 index 0000000..e81c7f1 --- /dev/null +++ b/Facade/OsInterface.php @@ -0,0 +1,14 @@ +