phergie/phergie-irc-generator
最新稳定版本:1.7.0
Composer 安装命令:
composer require phergie/phergie-irc-generator
包简介
Generator for messages conforming to the IRC protocol
关键字:
README 文档
README
This repo is being kept for posterity and will be archived in a readonly state. If you're interested it can be forked under a new Composer namespace/GitHub organization.
phergie/phergie-irc-generator
A PHP-based generator for messages conforming to the IRC protocol as described in RFC 1459.
Install
The recommended method of installation is through composer.
{
"minimum-stability": "dev",
"require": {
"phergie/phergie-irc-generator": "1.1.0"
}
}
Design goals
- Minimal dependencies: PHP 5.3.3+
- Simple easy-to-understand API
Usage
<?php $generator = new \Phergie\Irc\Generator(); $messages = $generator->ircPass('password') . $generator->ircNick('nick') . $generator->ircUser('username', 'hostname', 'servername', 'realname') . $generator->ircJoin('#channel1,#channel2') . $generator->ircPrivmsg('#channel1', 'Hello world!'); echo $messages; /* Output: PASS :password NICK :nick USER username hostname servername :realname JOIN :#channel1,#channel2 PRIVMSG #channel1 :Hello world! */
Tests
To run the unit test suite:
curl -s https://getcomposer.org/installer | php
php composer.phar install
./vendor/bin/phpunit Phergie/Irc/GeneratorTest.php
License
Released under the BSD License. See LICENSE.
Community
Check out #phergie on irc.freenode.net.
统计信息
- 总下载量: 22.94k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 0
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: BSD-2-Clause
- 更新时间: 2012-11-02