hgtan/mongo-odm-bundle

欢迎使用 Symfony2 Doctrine MongoDB 扩展包

dev-master / 1.0.1.x-dev 2015-07-23 08:13 UTC

This package is not auto-updated.

Last update: 2024-09-14 17:42:52 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License

Build Status Coverage Status Quality Score HHVM Status Dependency Status

SensioLabsInsight

这是一个简单的示例扩展包,使用 MongoDB 对象文档映射器(ODM)以及以下扩展包

安装

步骤 1:使用 Composer

composer.json

    php composer.phar require hgtan/mongo-odm-bundle:dev-master

步骤 2:注册扩展包

然后使用您的内核注册扩展包

    <?php

    // in AppKernel::registerBundles()
    $bundles = array(
        // ...
        new Hgtan\Bundle\HelloDoctrineMongoDBBundle\HgtanHelloDoctrineMongoDBBundle(),
        // ...
    );

步骤 3:配置扩展包

    # app/config/config.yml
    

步骤 4:测试

    $ php app/console hgtan:user:create
    Please choose a username: ahoang
    Please choose an email: hoang@example.com
    Please choose a password: 
    Created user ahoang