Advertisement
Guest User

EventHeadler

a guest
Jan 28th, 2020
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.51 KB | None | 0 0
  1. namespace danog\MadelineProto;
  2.  
  3. class EventHandler extends InternalDoc
  4. {
  5.     public function __construct(?API $MadelineProto)
  6.     {
  7.         if (!$MadelineProto) {
  8.             return;
  9.         }
  10.         $this->API = $MadelineProto->API;
  11.         $this->async = &$MadelineProto->async;
  12.         $this->methods = &$MadelineProto->methods;
  13.         foreach ($this->API->getMethodNamespaces() as $namespace) {
  14.             $this->{$namespace} = new APIFactory($namespace, $this->API, $this->async);
  15.         }
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement