polygram / pocr-bundle

PHPCR Bundle - 正处于开发中

安装: 12

依赖: 0

建议者: 0

安全性: 0

星标: 0

关注者: 2

分支: 1

公开问题: 0

类型:symfony-bundle

dev-master 2012-11-30 18:47 UTC

This package is not auto-updated.

Last update: 2024-09-28 14:22:36 UTC


README

##这个包是一个PHPCR的测试项目

  1. 要安装,首先在composer.json中添加以下内容:
    "polygram/phpcr-bundle": "dev-master"
  1. 运行

    "composer update"

    它也应该安装包的依赖项

    "require": {
        "jackalope/jackalope-jackrabbit": "1.0.*",
        "doctrine/phpcr-bundle": "1.0.*",
        "doctrine/phpcr-odm": "1.0.*",
        "doctrine/doctrine-fixtures-bundle": "dev-master"        
    }
  2. 在最后一条AnnotationRegistry::registerFile行之后添加以下行:

AnnotationRegistry::registerFile(__DIR__.'/../vendor/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/Mapping/Annotations/DoctrineAnnotations.php');
  1. 在AppKernel.php中初始化包
new Doctrine\Bundle\PHPCRBundle\DoctrinePHPCRBundle(),
new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(),
new polygram\PHPCRBundle\polygramPHPCRBundle(),
  1. 在你的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%
  1. 下载并运行Jackrabbit
    wget http://apache.online.bg/jackrabbit/2.4.3/jackrabbit-standalone-2.4.3.jar
    java -jar jackrabbit-standalone-*.jar
  1. 注册节点类型
    app/console doctrine:phpcr:register-system-node-types
  1. 安装固定装置
    app/console doctrine:phpcr:fixtures:load
    then run:
    app/console doctrine:phpcr:dump
    to see the result

待办事项

  1. 在默认控制器中列出仓库内容
  2. 扩展示例以使用其他2个CR后端
  3. 对PHPCR规范支持的部分进行测试