Advertisement
Guest User

Untitled

a guest
Jun 7th, 2015
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. <?php
  2.  
  3. class Car implements IVehicle
  4. {
  5.  
  6. /**
  7. * @var bool
  8. */
  9. protected $engine;
  10.  
  11. public function start()
  12. {
  13. $this->engine = true;
  14. }
  15.  
  16. public function stop()
  17. {
  18. $this->engine = false;
  19. }
  20.  
  21. public function status()
  22. {
  23. return $this->engine ? "Automotor eingeschaltet" : "Automotor ausgeschaltet";
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement