_bulb = $bulb; } public function execute() { $this->_bulb->turnOn(); } public function undo() { $this->_bulb->turnOff(); } public function redo() { $this->_bulb->turnOn(); }}class TurnOff implements Order { private $_bulb; public function __construct($bulb) { $this->_bulb = $bulb; } public function execute() { $this->_bulb->turnOff(); } public function undo() { $this->_bulb->turnOn(); } public function redo() { $this->_bulb->turnOff(); }}class Control { public function submit($order) { $order->execute(); }}$bulb = new Bulb();$turnOn = new TurnOn($bulb);$turnOff = new TurnOff($bulb);$control = new Control();$control->submit($turnOn);echo PHP_EOL;$control->submit($turnOff);