concept-it/orient-db-bundle

整合 Doctrine OrientDB ODM 与 Symfony2,并使用我自定义的持久化和删除方法。

安装: 20

依赖者: 0

建议者: 0

安全: 0

星标: 3

关注者: 2

分支: 1

开放问题: 0

类型:symfony-bundle

dev-master 2016-12-16 11:07 UTC

This package is not auto-updated.

Last update: 2024-09-14 15:00:46 UTC


README

整合 Doctrine OrientDB ODM 与 Symfony2,并使用我自定义的持久化和删除方法

要求

安装

Composer

安装此包的最佳方式是依赖 Composer

方法 1

假设您已安装 composer.phar 或 composer 二进制文件,直接运行

$ composer require concept-it/orient-db-bundle dev-master

方法 2

  1. 在您的 composer.json 中添加以下行
{
  "require": {
    "concept-it/orient-db-bundle": "dev-master"
  }
}
  1. 运行 composer 下载包
$ php composer.phar update concept-it/orient-db-bundle

将此包添加到应用程序的内核

// app/ApplicationKernel.php
public function registerBundles()
{
    return array(
        // ...
        new ConceptIt\OrientDbBundle\ConceptItOrientDbBundle(),
        // ...
    );
}

配置

# app/config/config.yml
concept_it_orient_db:
    host:               "127.0.0.1"
    port:               2480
    user:               "user"
    password:           "password"
    dbname:             "dbname"
    proxy_dir:          "%kernel.root_dir%/cache"
    domain_dir:         "%kernel.root_dir%/../src/YourBundle/Entity"
    domain_namespace:   "YourBundle\Entity"

在 Action 中的示例用法

    /**
     * @Route("/api/test")
     */
    public function testAction()
    {
        $om = $this->get('conceptit.orientdb');
        $test = new \ConceptIt\SmartShopperBundle\Entity\Test();
        $test->setName('Johny Walker');
        $om->persist($test);
        var_dump($test);die;
    }

作者

Tomasz Cyrankowski - tomek@concept-it.pl

许可证

OrientDbBundle 在 MIT 许可证下授权 - 有关详细信息,请参阅 LICENSE 文件