polygram / pocr-bundle
PHPCR Bundle - 正处于开发中
dev-master
2012-11-30 18:47 UTC
Requires
- php: >=5.3.2
- doctrine/doctrine-fixtures-bundle: dev-master
- doctrine/phpcr-bundle: 1.0.*
- doctrine/phpcr-odm: 1.0.*
- jackalope/jackalope-jackrabbit: 1.0.*
Requires (Dev)
- symfony/framework-bundle: >=2.1,<2.2-dev
This package is not auto-updated.
Last update: 2024-09-28 14:22:36 UTC
README
##这个包是一个PHPCR的测试项目
- 要安装,首先在composer.json中添加以下内容:
"polygram/phpcr-bundle": "dev-master"
-
运行
"composer update"
它也应该安装包的依赖项
"require": { "jackalope/jackalope-jackrabbit": "1.0.*", "doctrine/phpcr-bundle": "1.0.*", "doctrine/phpcr-odm": "1.0.*", "doctrine/doctrine-fixtures-bundle": "dev-master" }
-
在最后一条AnnotationRegistry::registerFile行之后添加以下行:
AnnotationRegistry::registerFile(__DIR__.'/../vendor/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/Mapping/Annotations/DoctrineAnnotations.php');
- 在AppKernel.php中初始化包
new Doctrine\Bundle\PHPCRBundle\DoctrinePHPCRBundle(), new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(), new polygram\PHPCRBundle\polygramPHPCRBundle(),
- 在你的config.yml中添加以下内容:
doctrine_phpcr: session: backend: type: jackrabbit url: http://127.0.0.1:8080/server/ workspace: default username: admin password: admin odm: auto_mapping: true auto_generate_proxy_classes: %kernel.debug%
- 下载并运行Jackrabbit
wget http://apache.online.bg/jackrabbit/2.4.3/jackrabbit-standalone-2.4.3.jar
java -jar jackrabbit-standalone-*.jar
- 注册节点类型
app/console doctrine:phpcr:register-system-node-types
- 安装固定装置
app/console doctrine:phpcr:fixtures:load
then run:
app/console doctrine:phpcr:dump
to see the result
待办事项
- 在默认控制器中列出仓库内容
- 扩展示例以使用其他2个CR后端
- 对PHPCR规范支持的部分进行测试