赵磊梅 / mots-fleches-parser
MFL文件解析器
2.0.1
2019-11-17 17:05 UTC
Requires
- php: >=7.1
- ext-json: *
Requires (Dev)
- phpunit/phpunit: 5.5.4
This package is auto-updated.
Last update: 2024-09-26 05:49:13 UTC
README
mots-fleches-parser
一个简单但实用的库,帮助您解析mots fléchés文件,支持MFL或MFJ格式。
示例
use PierreLemee\MotsFleches\GridParser; $parser = new GridParser(); $grid = $parser->parseFile($file = __DIR__ . '/tests/PierreLemee/MflParser/grids/grid_ok.mfj'); echo "Read grid ({$grid->getWidth()}x{$grid->getHeight()}) from file {$file}" . PHP_EOL; foreach ($grid->getWords() as $word) { echo "Definition at ({$word->getX()}:{$word->getY()}) with direction {$word->getDirection()}: {$word->getDefinition()} => {$word->getContent()}" . PHP_EOL; }
注意:对于MFJ文件,系统主机上需要安装node二进制文件。