original_string: public function convert(EventInterface $event)
      {
          $connection = $event->getConnection();
  
          $array = array(
              'message' => $event->getMessage(),
              'params' => $event->getParams(),
              'command' => $event->getCommand(),
              'connection' => array(
                  'serverHostname' => $connection->getServerHostname(),
                  'serverPort' => $connection->getServerPort(),
                  'nickname' => $connection->getNickname(),
                  'username' => $connection->getUsername(),
                  'hostname' => $connection->getHostname(),
                  'servername' => $connection->getServername(),
                  'realname' => $connection->getRealname(),
              ),
          );
  
          if ($event instanceof UserEventInterface) {
              $array['user'] = array(
                  'prefix' => $event->getPrefix(),
                  'nick' => $event->getNick(),
                  'username' => $event->getUsername(),
                  'host' => $event->getHost(),
                  'targets' => $event->getTargets(),
              );
          }
  
          if ($event instanceof CtcpEventInterface) {
              $array['ctcp'] = array(
                  'command' => $event->getCtcpCommand(),
                  'params' => $event->getCtcpParams(),
              );
          }
  
          return $array;
      }
code: public function convert(EventInterface $event)
      {
          $connection = $event->getConnection();
  
          $array = array(
              'message' => $event->getMessage(),
              'params' => $event->getParams(),
              'command' => $event->getCommand(),
              'connection' => array(
                  'serverHostname' => $connection->getServerHostname(),
                  'serverPort' => $connection->getServerPort(),
                  'nickname' => $connection->getNickname(),
                  'username' => $connection->getUsername(),
                  'hostname' => $connection->getHostname(),
                  'servername' => $connection->getServername(),
                  'realname' => $connection->getRealname(),
              ),
          );
  
          if ($event instanceof UserEventInterface) {
              $array['user'] = array(
                  'prefix' => $event->getPrefix(),
                  'nick' => $event->getNick(),
                  'username' => $event->getUsername(),
                  'host' => $event->getHost(),
                  'targets' => $event->getTargets(),
              );
          }
  
          if ($event instanceof CtcpEventInterface) {
              $array['ctcp'] = array(
                  'command' => $event->getCtcpCommand(),
                  'params' => $event->getCtcpParams(),
              );
          }
  
          return $array;
      }
code_tokens: public function convert ( EventInterface $ event ) { $ connection = $ event -> getConnection ( ) ; $ array = array ( 'message' => $ event -> getMessage ( ) , 'params' => $ event -> getParams ( ) , 'command' => $ event -> getCommand ( ) , 'connection' => array ( 'serverHostname' => $ connection -> getServerHostname ( ) , 'serverPort' => $ connection -> getServerPort ( ) , 'nickname' => $ connection -> getNickname ( ) , 'username' => $ connection -> getUsername ( ) , 'hostname' => $ connection -> getHostname ( ) , 'servername' => $ connection -> getServername ( ) , 'realname' => $ connection -> getRealname ( ) , ) , ) ; if ( $ event instanceof UserEventInterface ) { $ array [ 'user' ] = array ( 'prefix' => $ event -> getPrefix ( ) , 'nick' => $ event -> getNick ( ) , 'username' => $ event -> getUsername ( ) , 'host' => $ event -> getHost ( ) , 'targets' => $ event -> getTargets ( ) , ) ; } if ( $ event instanceof CtcpEventInterface ) { $ array [ 'ctcp' ] = array ( 'command' => $ event -> getCtcpCommand ( ) , 'params' => $ event -> getCtcpParams ( ) , ) ; } return $ array ; }
docstring: Converts an event object into an array.
  
  @param \Phergie\Irc\Event\EventInterface $event
  @return array
docstring_tokens: Converts an event object into an array .