rdf / job-definition-format-bundle
本包提供了读取、写入和修改JDF的各种工具
dev-master
2012-01-22 05:27 UTC
Requires
- php: >=5.3.2
- doctrine/doctrine-oxm-bundle: master-dev
This package is auto-updated.
Last update: 2024-08-27 07:02:58 UTC
README
A Symfony2 Bundle for working with the CIP4 Job Definition Format specification.
- 尚未准备用于生产使用(见下方的
状态
)
安装
RDFJobDefinitionFormatBundle 使用了来自 Doctrine 的 oxm 和 DoctrineOXMBundle 项目。
步骤 1: 下载 RDFJobDefintionFormatBundle
使用 vendors 脚本
将以下内容添加到您的 deps
文件中
[RDFJobDefinitionFormatBundle]
git=git://github.com/richardfullmer/RDFJobDefinitionFormatBundle.git
target=/bundles/RDF/JobDefinitionFormatBundle
[doctrine-oxm]
git=http://github.com/doctrine/oxm.git
target=/doctrine-oxm
[DoctrineOXMBundle]
git=http://github.com/doctrine/DoctrineOXMBundle.git
target=/bundles/Doctrine/Bundle/OXMBundle
并运行 vendors 脚本
$ php bin/vendors install
使用 composer
将以下内容添加到您的 composer.json
文件中
{
"require": {
"rdf/job-definition-format-bundle": "master-dev"
}
}
步骤 2: 配置自动加载器
将 RDF
命名空间添加到自动加载器
<?php
// app/autoload.php
$loader->registerNamespaces(array(
// ...
'RDF' => __DIR__.'/../vendor/bundles',
'Doctrine\\OXM' => __DIR__.'/../vendor/doctrine-oxm/lib',
'Doctrine\\Bundle' => __DIR__.'/../vendor/bundles',
));
并确保您已注册 OXM 注释
// app/autoload.php
AnnotationRegistry::registerFile(__DIR__.'/../vendor/doctrine-oxm/lib/Doctrine/OXM/Mapping/Driver/DoctrineAnnotations.php');
步骤 3: 启用包
在 kernel 中启用包
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new RDF\JobDefinitionFormatBundle\RDFJobDefinitionFormatBundle(),
new Doctrine\Bundle\OXMBundle\DoctrineOXMBundle(),
);
}
配置
TODO
单元测试
可以使用 phpunit
运行单元测试,并使用 composer.phar
包括依赖项
$ wget -nc https://getcomposer.org.cn/composer.phar
$ php composer.phar install
$ phpunit --coverage-text
状态
- JDF 特定的数据类型(已完成)
- 使用 doctrine-oxm 序列化的元数据(进行中)
- 使用 Symfony2 验证库验证 JDF 实体(计划中)
- 用于轻松构建和遍历 JDF 对象的构建器(计划中)
- ID <=> IDREF 查找解析(计划中)
- JDF 设备能力感知 JDF 工作流程(计划中)
作者
Richard Fullmer richardfullmer@gmail.com
许可协议
RDFJobDefinitionFormatBundle 在 MIT 许可证下发布。有关详细信息,请参阅 LICENSE 文件。