Guest User

Untitled

a guest
Jun 13th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4. * @author Andres Galindo
  5. * @copyright 2009
  6. */
  7.  
  8.  
  9. interface absPlugin
  10. {
  11. public function Go();
  12. }
  13.  
  14.  
  15. class PornPlugin implements absPlugin
  16. {
  17. //Produces error, not the same scope!
  18. private function Go()
  19. {
  20.  
  21. }
  22. }
  23.  
  24.  
  25. class AnotherPornPlugin implements absPlugin
  26. {
  27. //Produces error! interface method
  28. //doesn't contain a variable
  29. public function Go($do)
  30. {
  31.  
  32. }
  33. }
  34.  
  35. class YetAnotherPornPlugin implements absPlugin
  36. {
  37. //This class will error because it doesn't have the Go
  38. //function
  39. public function Gob()
  40. {
  41.  
  42. }
  43. }
  44.  
  45. class TheFinalPornPlugin implements absPlugin
  46. {
  47. //This one will work fine
  48. public function Go()
  49. {
  50.  
  51. }
  52. }
  53.  
  54. ?>
Add Comment
Please, Sign In to add comment