src/CommandEvent.php
public function fromEvent(UserEventInterface $event)
    {
        // EventInterface
        $this->setMessage($event->getMessage());
        $this->setConnection($event->getConnection());
        $this->setParams($event->getParams());
        $this->setCommand($event->getCommand());

        // UserEventInterface
        $this->setPrefix($event->getPrefix());
        $this->setNick($event->getNick());
        $this->setUsername($event->getUsername());
        $this->setHost($event->getHost());
        $this->setTargets($event->getTargets());
    }
public function fromEvent(UserEventInterface $event)
    {
        // EventInterface
        $this->setMessage($event->getMessage());
        $this->setConnection($event->getConnection());
        $this->setParams($event->getParams());
        $this->setCommand($event->getCommand());

        // UserEventInterface
        $this->setPrefix($event->getPrefix());
        $this->setNick($event->getNick());
        $this->setUsername($event->getUsername());
        $this->setHost($event->getHost());
        $this->setTargets($event->getTargets());
    }
Copies data from an existing event into this one.

@param \Phergie\Irc\Event\UserEventInterface $event