public function request($cmd)
  {
    $query = \ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\Helper\String::factory($cmd)->section(\ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\TeamSpeak3::SEPARATOR_CELL);

    if(strstr($cmd, "\r") || strstr($cmd, "\n"))
    {
      throw new Exception("illegal characters in command '" . $query . "'");
    }
    elseif(in_array($query, $this->block))
    {
      throw new ServerQuery\Exception("command not found", 0x100);
    }

    \ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\Helper\Signal::getInstance()->emit("serverqueryCommandStarted", $cmd);

    $this->getProfiler()->start();
    $this->getTransport()->sendLine($cmd);
    $this->timer = time();
    $this->count++;

    $rpl = array();

    do {
      $str = $this->getTransport()->readLine();
      $rpl[] = $str;
    } while($str instanceof \ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\Helper\String && $str->section(\ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\TeamSpeak3::SEPARATOR_CELL) != \ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\TeamSpeak3::ERROR);

    $this->getProfiler()->stop();

    $reply = new ServerQuery\Reply($rpl, $cmd, $this->getHost());

    \ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\Helper\Signal::getInstance()->emit("serverqueryCommandFinished", $cmd, $reply);

    return $reply;
  }
public function request($cmd)
  {
    $query = \ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\Helper\String::factory($cmd)->section(\ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\TeamSpeak3::SEPARATOR_CELL);

    if(strstr($cmd, "\r") || strstr($cmd, "\n"))
    {
      throw new Exception("illegal characters in command '" . $query . "'");
    }
    elseif(in_array($query, $this->block))
    {
      throw new ServerQuery\Exception("command not found", 0x100);
    }

    \ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\Helper\Signal::getInstance()->emit("serverqueryCommandStarted", $cmd);

    $this->getProfiler()->start();
    $this->getTransport()->sendLine($cmd);
    $this->timer = time();
    $this->count++;

    $rpl = array();

    do {
      $str = $this->getTransport()->readLine();
      $rpl[] = $str;
    } while($str instanceof \ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\Helper\String && $str->section(\ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\TeamSpeak3::SEPARATOR_CELL) != \ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\TeamSpeak3::ERROR);

    $this->getProfiler()->stop();

    $reply = new ServerQuery\Reply($rpl, $cmd, $this->getHost());

    \ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\Helper\Signal::getInstance()->emit("serverqueryCommandFinished", $cmd, $reply);

    return $reply;
  }
public function request ( $ cmd ) { $ query = \ ManiaLivePlugins \ Standard \ TeamSpeak \ TeamSpeak3 \ Helper \ String :: factory ( $ cmd ) -> section ( \ ManiaLivePlugins \ Standard \ TeamSpeak \ TeamSpeak3 \ TeamSpeak3 :: SEPARATOR_CELL ) ; if ( strstr ( $ cmd , "\r" ) || strstr ( $ cmd , "\n" ) ) { throw new Exception ( "illegal characters in command '" . $ query . "'" ) ; } elseif ( in_array ( $ query , $ this -> block ) ) { throw new ServerQuery \ Exception ( "command not found" , 0x100 ) ; } \ ManiaLivePlugins \ Standard \ TeamSpeak \ TeamSpeak3 \ Helper \ Signal :: getInstance ( ) -> emit ( "serverqueryCommandStarted" , $ cmd ) ; $ this -> getProfiler ( ) -> start ( ) ; $ this -> getTransport ( ) -> sendLine ( $ cmd ) ; $ this -> timer = time ( ) ; $ this -> count ++ ; $ rpl = array ( ) ; do { $ str = $ this -> getTransport ( ) -> readLine ( ) ; $ rpl [ ] = $ str ; } while ( $ str instanceof \ ManiaLivePlugins \ Standard \ TeamSpeak \ TeamSpeak3 \ Helper \ String && $ str -> section ( \ ManiaLivePlugins \ Standard \ TeamSpeak \ TeamSpeak3 \ TeamSpeak3 :: SEPARATOR_CELL ) != \ ManiaLivePlugins \ Standard \ TeamSpeak \ TeamSpeak3 \ TeamSpeak3 :: ERROR ) ; $ this -> getProfiler ( ) -> stop ( ) ; $ reply = new ServerQuery \ Reply ( $ rpl , $ cmd , $ this -> getHost ( ) ) ; \ ManiaLivePlugins \ Standard \ TeamSpeak \ TeamSpeak3 \ Helper \ Signal :: getInstance ( ) -> emit ( "serverqueryCommandFinished" , $ cmd , $ reply ) ; return $ reply ; }
Sends a prepared command to the server and returns the result.

@param  string $cmd
@throws Exception
@return ServerQuery\Reply
Sends a prepared command to the server and returns the result .