2017 © Pedro Peláez
 

library phergie-irc-parser

Parser for messages conforming to the IRC protocol

image

phergie/phergie-irc-parser

Parser for messages conforming to the IRC protocol

  • Friday, June 29, 2018
  • by elazar
  • Repository
  • 6 Watchers
  • 16 Stars
  • 13,921 Installations
  • PHP
  • 6 Dependents
  • 0 Suggesters
  • 10 Forks
  • 3 Open issues
  • 15 Versions
  • 2 % Grown

The README.md

This project is abandoned

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., (*1)

phergie/phergie-irc-parser

A PHP-based parser for messages conforming to the IRC protocol as described in RFC 1459 and RFC 2812., (*2)

Build Status, (*3)

Install

The recommended method of installation is through composer., (*4)

{
    "require": {
        "phergie/phergie-irc-parser": "~1"
    }
}

Design goals

  • Minimal dependencies: PHP 5.4.2+ with the core PCRE extension
  • Can extract messages from a real-time data stream
  • Simple easy-to-understand API

Usage

<?php
$stream = ":Angel PRIVMSG Wiz :Hello are you receiving this message ?\r\n"
        . "PRIVMSG Angel :yes I'm receiving it !receiving it !'u>(768u+1n) .br\r\n";
$parser = new Phergie\Irc\Parser();

// Get one message without modifying $stream
// or null if no complete message is found
$message = $parser->parse($stream);

// Get one message and remove it from $stream
// or null if no complete message is found
$message = $parser->consume($stream);

// Get all messages without modifying $stream
// or an empty array if no complete messages are found
$messages = $parser->parseAll($stream);

// Get all messages and remove them from $stream
// or an empty array if no complete messages are found
$messages = $parser->consumeAll($stream);

/*
One parsed message looks like this:
array(
    'prefix' => ':Angel',
    'nick' => 'Angel',
    'command' => 'PRIVMSG',
    'params' => array(
        'receivers' => 'Wiz',
        'text' => 'Hello are you receiving this message ?',
        'all' => 'Wiz :Hello are you receiving this message ?',
    ),
    'targets' => array('Wiz'),
    'message' => ":Angel PRIVMSG Wiz :Hello are you receiving this message ?\r\n",
)
*/

Tests

To run the unit test suite:, (*5)

curl -s https://getcomposer.org/installer | php
php composer.phar install
./vendor/bin/phpunit Phergie/Irc/ParserTest.php

License

Released under the BSD License. See LICENSE., (*6)

Community

Check out #phergie on irc.freenode.net or e-mail us at team@phergie.org., (*7)

The Versions

29/06 2018

dev-master

9999999-dev

Parser for messages conforming to the IRC protocol

  Sources   Download

BSD-2-Clause

The Requires

  • php ^7.0 || ^5.6

 

The Development Requires

parser irc

07/03 2016

2.3.0

2.3.0.0

Parser for messages conforming to the IRC protocol

  Sources   Download

BSD-2-Clause

The Requires

  • php >=5.5

 

The Development Requires

parser irc

12/11 2015

2.2.0

2.2.0.0

Parser for messages conforming to the IRC protocol

  Sources   Download

BSD-2-Clause

The Requires

  • php >=5.5

 

The Development Requires

parser irc

10/11 2015

dev-update-to-phergie/phergie-irc-bot-react-development

dev-update-to-phergie/phergie-irc-bot-react-development

Parser for messages conforming to the IRC protocol

  Sources   Download

BSD-2-Clause

The Requires

  • php >=5.5

 

The Development Requires

parser irc

16/07 2015

2.1.0

2.1.0.0

Parser for messages conforming to the IRC protocol

  Sources   Download

BSD-2-Clause

The Requires

  • php >=5.4.2

 

The Development Requires

parser irc

10/06 2015

2.0.1

2.0.1.0

Parser for messages conforming to the IRC protocol

  Sources   Download

BSD-2-Clause

The Requires

  • php >=5.4.2

 

The Development Requires

parser irc

22/05 2015

2.0.0

2.0.0.0

Parser for messages conforming to the IRC protocol

  Sources   Download

BSD-2-Clause

The Requires

  • php >=5.4.2

 

The Development Requires

parser irc

30/03 2015

1.6.1

1.6.1.0

Parser for messages conforming to the IRC protocol

  Sources   Download

BSD-2-Clause

The Requires

  • php >=5.3.3

 

The Development Requires

parser irc

29/03 2015

1.6.0

1.6.0.0

Parser for messages conforming to the IRC protocol

  Sources   Download

BSD-2-Clause

The Requires

  • php >=5.3.3

 

The Development Requires

parser irc

09/07 2014

1.5.0

1.5.0.0

Parser for messages conforming to the IRC protocol

  Sources   Download

BSD-2-Clause

The Requires

  • php >=5.3.3

 

The Development Requires

parser irc

05/11 2013

1.4.0

1.4.0.0

Parser for messages conforming to the IRC protocol

  Sources   Download

BSD-2-Clause

The Requires

  • php >=5.3.3

 

parser irc

05/10 2013

1.3.0

1.3.0.0

Parser for messages conforming to the IRC protocol

  Sources   Download

BSD-2-Clause

The Requires

  • php >=5.3.3

 

parser irc

15/07 2013

1.2.0

1.2.0.0

Parser for messages conforming to the IRC protocol

  Sources   Download

BSD-2-Clause

The Requires

  • php >=5.3.3

 

parser irc

05/03 2013

1.1.0

1.1.0.0

Parser for messages conforming to the IRC protocol

  Sources   Download

BSD-2-Clause

The Requires

  • php >=5.3.3

 

parser irc

20/10 2012

1.0.0

1.0.0.0

Parser for messages conforming to the IRC protocol

  Sources   Download

BSD-2-Clause

The Requires

  • php >=5.3.3

 

parser irc