PHP7 Facade

This commit is contained in:
Dominik Liebler
2016-09-23 10:19:17 +02:00
parent e6c67c5da5
commit b556436fa2
7 changed files with 698 additions and 413 deletions

View File

@@ -7,17 +7,14 @@ class Facade
/**
* @var OsInterface
*/
protected $os;
private $os;
/**
* @var BiosInterface
*/
protected $bios;
private $bios;
/**
* This is the perfect time to use a dependency injection container
* to create an instance of this class.
*
* @param BiosInterface $bios
* @param OsInterface $os
*/
@@ -27,9 +24,6 @@ class Facade
$this->os = $os;
}
/**
* Turn on the system.
*/
public function turnOn()
{
$this->bios->execute();
@@ -37,9 +31,6 @@ class Facade
$this->bios->launch($this->os);
}
/**
* Turn off the system.
*/
public function turnOff()
{
$this->os->halt();