ronanguilloux/silexmarkdownserviceprovider
Composer 安装命令:
composer require ronanguilloux/silexmarkdownserviceprovider
包简介
Silex micro-framework Markdown service provider
README 文档
README
Silex PHP micro-framework Markdown Service Provider
To be used with Michel Fortin's michelf/php-markdown PHP parser for Markdown and Markdown Extra derived from the original Markdown.pl by John Gruber
Implementations examples:
- SilexMarkdown demo website (github repository)
Usage
<?php # app.php use Rg\Silex\Provider\Markdown\MarkdownServiceProvider; $app->register(new MarkdownServiceProvider(), array( 'md.path' => __DIR__ .'/relative-path-to-markdown-files-directory') ); // Retrieve .md file content $markdown = $app['md.finder']->getContent('path-to-mardown-file'); // Parse it into html $html = $app['md.parser']->transform($markdown);
Tests
Tests need --dev option while installing dependecing using composer:
$ composer.phar install --dev
$ wget http://pear.phpunit.de/get/phpunit.phar
$ chmod +x phpunit.phar
$ ./phpunit.phar
License
This Silex Service Provider is released under the MIT License.
See the bundled LICENSE file for details.
You can find a copy of this software here: https://github.com/ronanguilloux/SilexMarkdownServiceProvider
统计信息
- 总下载量: 151
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2013-06-16