thapp/xmlconf
Composer 安装命令:
composer require thapp/xmlconf
包简介
Xml configuration utility
README 文档
README
Synopsis
This package lets you easily bootstrap data, objects, or whatever from an xml configuration file. The xml configuration file however must validate against a provided xsd schema.
Installation
Add thapp/xmlconf as a requirement to composer.json:
{
"require": {
"thapp/xmlconf": "1.0.*"
}
}
Then run composer update or composer install
Next step is to tell laravel to load the serviceprovider. In app/config/app.php add
// ... 'Thapp\XmlConf\XmlConfServiceProvider' // ...
to the providers array.
Publish configuration
php artisan config:publish thapp/xmlconfig
Examples
This package provides an example directory that should get you started quickly.
For a first glimpse you may copy the storage/sections/config.xml that is included with this package to
app/storage/sections/config.xml.
Next, create a new route. Somethig like this should do:
Route::get('/examples', function () use ($app) { $SectionRepository = new Thapp\XmlConf\Examples\Sections\Repository($app['xmlconf.sections']); var_dump($SectionRepository); });
General
File structure
- Vendor/
- ReaderName/
- Schema/
- readername.xsd
- ReaderNameSimpleXml.php
- ReaderNameConfigReader.php
xml storage structure
- app/
- storage/
- ReaderName/
- config.xml
统计信息
- 总下载量: 75
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2013-04-28