Linguist is a PHP library for parsing strings, it can extract and manipulate prefixed words in content ideal for working with @mentions, #topics and custom tags!
PHP
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples
src
tests
.gitignore
.scrutinizer.yml
.travis.yml
LICENSE
README.md
composer.json
composer.lock
phpunit.php
phpunit.xml

README.md

Linguist

Build Status Code Coverage Scrutinizer Code Quality Code Climate Latest Stable Version Latest Unstable Version License

Linguist is a PHP library for parsing strings, it can extract and manipulate prefixed words in content ideal for working with @mentions, #topics and custom tags!

Requirements

  • PHP >= 5.4.0

This library is unit tested against PHP 5.4, 5.5, 5.6, 7.0 and HHVM!

License

This library is released under the GPLv3 license, you are welcome to use it, improve it and contribute your changes back!

Installation

The recommended way of installing this library is via. Composer; To install using Composer type the following command at the console:

composer require ballen/linguist

Alternately you can add it to your composer.json file manually in the require section like so:

"ballen/linguist": "^1.0"

Then install the package by running the composer update ballen/linguist command.

Examples

A set of working examples can be found in the /examples directory.

Tests and coverage

This library is fully unit tested using PHPUnit.

I use TravisCI for continuous integration, which triggers tests for PHP 5.4, 5.5, 5.6, 7.0 and HHVM every time a commit is pushed.

If you wish to run the tests yourself you should run the following:

# Install the Linguist Library with the 'development' packages this then includes PHPUnit!
composer install --dev


# Now we run the unit tests (from the root of the project) like so:
./vendor/bin/phpunit

Code coverage can also be ran but requires XDebug installed...

./vendor/bin/phpunit --coverage-html ./report

Support

I am happy to provide support via. my personal email address, so if you need a hand drop me an email at: ballen@bobbyallen.me.