Guest User

Untitled

a guest
Jun 20th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. <?php
  2.  
  3. class OnText{
  4.  
  5. private reaction;
  6. public function _construct(){
  7. $this->reload();
  8. }
  9.  
  10. /**
  11. let you use the event directly from Object
  12.  
  13. @example
  14. $OnText = new OnText;
  15. $OnText("the message");
  16.  
  17. */
  18. public function __invoke($text){
  19. return $this->reaction($text);
  20. }
  21.  
  22. /**
  23. reload the OnText event from OnText.php
  24. */
  25. public function reload(){
  26. $this->reaction = include("OnText.php");
  27. }
  28.  
  29. }
  30.  
  31. ?>
Add Comment
Please, Sign In to add comment