zanson/sm-parser 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

zanson/sm-parser

最新稳定版本:v1.2

Composer 安装命令:

composer require zanson/sm-parser

包简介

a model and parser for stepmania files (.sm)

README 文档

README

Conveting SM to SSC and back

    $sm = new Zanson\SMParser\FileParser\SM();
    $sm->parse(dirname(__DIR__).'/test.sm');
    $convert = new \Zanson\SMParser\Model\Convert();
    $ssc = $convert->SMtoSSC($sm->song);
    $ssc = new Zanson\SMParser\FileParser\SSC();
    $ssc->parse(dirname(__DIR__).'/test.sm');
    $convert = new \Zanson\SMParser\Model\Convert();
    $sm = $convert->SSCtoSM($ssc->song);

Exporting

Exports simply take the object in the parser and return a string to be passed to a file or output of your choosing.

If you are not using the file parser class and just have a model, you must instantiate the parser class, and set the song using setsong($object) then run export.

$ssc = new Zanson\SMParser\FileParser\SSC();
$ssc->parse(file_get_contents(dirname(__DIR__) . '/test.ssc'));
file_put_contents($ssc->getFileName(), $ssc->export());
$ssc = new Zanson\SMParser\Model\SSC();
$parse = new Zanson\SMParser\FileParser\SSC();
$parse->setSong($ssc);
file_put_contents($parse->getFileName(), $parse->export());

统计信息

  • 总下载量: 31
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-08-23