Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class OnText{
- private reaction;
- public function _construct(){
- $this->reload();
- }
- /**
- let you use the event directly from Object
- @example
- $OnText = new OnText;
- $OnText("the message");
- */
- public function __invoke($text){
- return $this->reaction($text);
- }
- /**
- reload the OnText event from OnText.php
- */
- public function reload(){
- $this->reaction = include("OnText.php");
- }
- }
- ?>
Add Comment
Please, Sign In to add comment