lukezbihlyj/vdf-parser
最新稳定版本:1.0
Composer 安装命令:
composer require lukezbihlyj/vdf-parser
包简介
An open-source VDF parser for Valve's proprietary format used in Source games.
README 文档
README
An open-source VDF parser for Valve's proprietary format used in Source games. This package is 100% tested and available for use in any project under the MIT license. The parser currently supports all features of VDF, including:
- Arbitrary whitespace, including tab characters and spaces.
- Comments, which will be ignored during parsing.
- Escaped strings, allowing backslash escaping inside strings for both keys and values.
- Nested arrays, using recursion.
Installation
Via Composer
Add the following to your composer.json file and run composer update to update the dependencies and pull in the new package.
"require": { "lukezbihlyj/vdf-parser": "~1.0" }
Usage
Parsing
$string = <<<VDF { "key" "value" } VDF; $parser = new VdfParser\Parser; $result = $parser->parse($string); // // $result = [ // 'key' => 'value' // ] //
Testing
Unit tests are available and we strive to achieve 100% code coverage. Running the test suite is incredibly simple.
$ composer install $ php vendor/bin/phpunit -c test/phpunit.xml
In addition to the phpunit results being output to the terminal, code coverage documentation will also be generated under the build/ directory.
统计信息
- 总下载量: 7.63k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-02-13