clover / text-ltsv
Labeled Tab-separated Values (LTSV; cf. http://ltsv.org/) parser for PHP.
Installs: 70 794
Dependents: 1
Suggesters: 0
Security: 0
Stars: 11
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=5.3.3
Requires (Dev)
- phpunit/phpunit: 3.7.*
This package is not auto-updated.
Last update: 2024-11-20 11:45:52 UTC
README
Labeled Tab-separated Values (LTSV; cf. http://ltsv.org/) parser for PHP.
Install
Using Composer as a dependency management tool, you can bring Clover\Text\LTSV
in your environment easily with settings below.
{
"require": {
"clover/text-ltsv": "~1.0"
}
}
Usage
<?php $ltsv = new Clover\Text\LTSV(); $values = $ltsv->parseLine("hoge:foo\tbar:baz"); $values = $ltsv->parseFile('log.ltsv'); $it = $ltsv->getIteratorFromFile('log.ltsv'); foreach ($it as $values) { // do something } $ltsv->add('hoge', 'foo')->add('bar', 'baz'); $line = $ltsv->toLine();
License
Free to use under the terms of the New BSD License.