mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-23 06:44:14 +02:00
PHP7 Facade
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user