public function testGetSetParser() { $api = new Api(); $parser = $api->getParser(); $this->assertInstanceOf('\\Phergie\\Irc\\Parser', $parser); // And set a new one. $parser = new \Phergie\Irc\Parser(); $api->setParser($parser); $parserFromApi = $api->getParser(); $this->assertSame($parser, $parserFromApi); }
/** * @param IrcConnection $ircConnection */ public function setIrcConnection(IrcConnection $ircConnection) { $this->ircConnection = $ircConnection; $this->api->setIrcConnection($ircConnection); }
/** * Disconnect the bot from IRC. */ public function disconnect() { $this->write($this->api->getGenerator()->ircQuit()); $this->stream->close(); }