function register(string $name, string $class) {
        if(!\in_array('CharlotteDunois\Yasmin\Interfaces\WSEventInterface', \class_implements($class))) {
            throw new \RuntimeException('Specified event class does not implement interface');
        }
        
        $this->wsevents[$name] = new $class($this->wshandler->wsmanager->client, $this->wshandler->wsmanager);
    }
function register(string $name, string $class) {
        if(!\in_array('CharlotteDunois\Yasmin\Interfaces\WSEventInterface', \class_implements($class))) {
            throw new \RuntimeException('Specified event class does not implement interface');
        }
        
        $this->wsevents[$name] = new $class($this->wshandler->wsmanager->client, $this->wshandler->wsmanager);
    }
function register ( string $ name , string $ class ) { if ( ! \ in_array ( 'CharlotteDunois\Yasmin\Interfaces\WSEventInterface' , \ class_implements ( $ class ) ) ) { throw new \ RuntimeException ( 'Specified event class does not implement interface' ) ; } $ this -> wsevents [ $ name ] = new $ class ( $ this -> wshandler -> wsmanager -> client , $ this -> wshandler -> wsmanager ) ; }
Registers an event.
@return void
@throws \RuntimeException
Registers an event .