2017 © Pedro Peláez
 

library plusminus-parser

Parses ++ and -- messages from strings

image

asm89/plusminus-parser

Parses ++ and -- messages from strings

  • Tuesday, January 14, 2014
  • by asm89
  • Repository
  • 4 Watchers
  • 2 Stars
  • 55 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

plusminus-parser

A small library to parse ++ and -- messages. For example:, (*1)

asm89 | qbot++
 qbot | current score for qbot: 1337
asm89 | [it handles spaces]++
 qbot | current score for it handles spaces: 42

Installation

Run:, (*2)

composer require asm89/plusminus-parser

or add it to your composer.json file., (*3)

Usage

Create a parser and pass it the matchers you want to use., (*4)

$parser = new Asm89\PlusMinus\MessageParser([
    new Asm89\PlusMinus\WordMatcher(0),
    new Asm89\PlusMinus\BracketMatcher(1), // bracket items take priority
]):

/** @return null|Item */
$item = $parser->parse($message);

// item API
$item->getValue();
$item->isMinus();
$item->isPlus();

The Versions

14/01 2014

dev-master

9999999-dev

Parses ++ and -- messages from strings

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

14/01 2014

1.0.0

1.0.0.0

Parses ++ and -- messages from strings

  Sources   Download

MIT

The Requires

  • php >=5.4.0