2017 © Pedro Peláez
 

library doctrine-mongo-odm-module

Zend Framework Module that provides Doctrine MongoDB ODM functionality

image

alexandrealmeidaferreira/doctrine-mongo-odm-module

Zend Framework Module that provides Doctrine MongoDB ODM functionality

  • Sunday, April 22, 2018
  • by Alexandre Almeida Ferreira
  • Repository
  • 1 Watchers
  • 0 Stars
  • 16 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 81 Forks
  • 0 Open issues
  • 17 Versions
  • 0 % Grown

The README.md

Doctrine MongoDB ODM Module for Zend Framework 2

Master: Build Status, (*1)

The DoctrineMongoODMModule integrates Doctrine 2 MongoDB ODM with Zend Framework 2 quickly and easily. The following features are intended to work out of the box:, (*2)

  • MongoDB support
  • Multiple document managers
  • Multiple connections
  • Support for using existing Mongo connections
  • Doctrine Cli support

Requirements

Zend Framework 2 Application Skeleton (or compatible architecture), (*3)

Installation

Installation of this module uses composer. For composer documentation, please refer to getcomposer.org., (*4)

Installation steps

  1. cd my/project/directory
  2. create a composer.json file with following contents:, (*5)

    json { "require": { "doctrine/doctrine-mongo-odm-module": "^1.0" } }, (*6)

  3. install composer via curl -s http://getcomposer.org/installer | php (on windows, download http://getcomposer.org/installer and execute it with PHP)
  4. run php composer.phar install
  5. open my/project/directory/configs/application.config.php and add following keys to your modules (in this order), (*7)

    php 'DoctrineModule', 'DoctrineMongoODMModule',, (*8)

  6. copy vendor/doctrine/doctrine-mongo-odm-module/config/module.doctrine-mongo-odm.local.php.dist into your application's config/autoload directory, rename it to module.doctrine-mongo-odm.local.php and make the appropriate changes. With this config file you can configure your mongo connection, add extra annotations to register, add subscribers to the event manager, add filters to the filter collection, and drivers to the driver chain., (*9)

  7. create directory my/project/directory/data/DoctrineMongoODMModule/Proxy and my/project/directory/data/DoctrineMongoODMModule/Hydrator and make sure your application has write access to it., (*10)

Usage

Command Line

Access the Doctrine command line as following, (*11)

./vendor/bin/doctrine-module

Service Locator

Access the document manager using the following service manager alias:, (*12)

<?php
$dm = $this->getServiceLocator()->get('doctrine.documentmanager.odm_default');

Configuration

Connection section

Either server or connectionString option has to be set., (*13)

Name Default Description
server 'localhost' IP of mongod instance
port 27017 mongod port
connectionString null If the connection string is specified, it will overwrite other connection options (server,port,user,password,dbname). Still, the connection will respect the settings passed in options array.
user null If set, the client will try to authenticate with given username and password
password null If set, the client will try to authenticate with given username and password
dbname null If dbname is not specified, "admin" will be used for authentication. Also, specifiing dbname affecs the defaultDB configuration option, if that's not specified explicitly.
options array() Array with connection options. More detailed description in http://www.php.net/manual/en/mongoclient.construct.php

The Versions

15/12 2012

0.1.2

0.1.2.0 http://www.doctrine-project.org/

Zend Framework 2 Module that provides Doctrine MongoDB ODM functionality

  Sources   Download

MIT

The Requires

 

mongodb zf2 doctrine module odm

31/10 2012

0.1.1

0.1.1.0 http://www.doctrine-project.org/

Zend Framework 2 Module that provides Doctrine MongoDB ODM functionality

  Sources   Download

MIT

The Requires

 

mongodb zf2 doctrine module odm

12/10 2012

0.1.0

0.1.0.0 http://www.doctrine-project.org/

Zend Framework 2 Module that provides Doctrine MongoDB ODM functionality

  Sources   Download

MIT

The Requires

 

mongodb zf2 doctrine module odm