1- # Doctrine 2 ORM Module for Zend Framework 2
1+ # Doctrine 2 ORM Module for Zend Framework
22
33[ ![ Master branch build status] ( https://secure.travis-ci.org/doctrine/DoctrineORMModule.png?branch=master )] ( http://travis-ci.org/doctrine/DoctrineORMModule ) [ ![ Scrutinizer Quality Score] ( https://scrutinizer-ci.com/g/doctrine/DoctrineORMModule/badges/quality-score.png?s=1e2a047fb1bb0f66937bcbc3a61f960c8089c835 )] ( https://scrutinizer-ci.com/g/doctrine/DoctrineORMModule/ ) [ ![ Code Coverage] ( https://scrutinizer-ci.com/g/doctrine/DoctrineORMModule/badges/coverage.png?s=377656ded5ffaaf4635acfb26729caa212fb5d76 )] ( https://scrutinizer-ci.com/g/doctrine/DoctrineORMModule/ ) [ ![ Latest Stable Version] ( https://poser.pugx.org/doctrine/doctrine-orm-module/v/stable.png )] ( https://packagist.org/packages/doctrine/doctrine-orm-module ) [ ![ Total Downloads] ( https://poser.pugx.org/doctrine/doctrine-orm-module/downloads.png )] ( https://packagist.org/packages/doctrine/doctrine-orm-module )
44
5- DoctrineORMModule integrates Doctrine 2 ORM with Zend Framework 2 quickly and easily.
5+ DoctrineORMModule integrates Doctrine 2 ORM with Zend Framework quickly and easily.
66
77 - Doctrine 2 ORM support
88 - Multiple ORM entity managers
@@ -15,7 +15,7 @@ Installation of this module uses composer. For composer documentation, please re
1515[ getcomposer.org] ( http://getcomposer.org/ ) .
1616
1717``` sh
18- php composer.phar require doctrine/doctrine-orm-module
18+ composer require doctrine/doctrine-orm-module
1919```
2020
2121Then add ` DoctrineModule ` and ` DoctrineORMModule ` to your ` config/application.config.php ` and create directory
@@ -31,30 +31,30 @@ configuration for each of your entities namespaces:
3131
3232``` php
3333<?php
34- return array(
35- 'doctrine' => array(
36- 'driver' => array(
34+ return [
35+ 'doctrine' => [
36+ 'driver' => [
3737 // defines an annotation driver with two paths, and names it `my_annotation_driver`
38- 'my_annotation_driver' => array(
38+ 'my_annotation_driver' => [
3939 'class' => 'Doctrine\ORM\Mapping\Driver\AnnotationDriver',
4040 'cache' => 'array',
41- 'paths' => array(
41+ 'paths' => [
4242 'path/to/my/entities',
43- 'another/path'
44- ) ,
45- ) ,
43+ 'another/path',
44+ ] ,
45+ ] ,
4646
4747 // default metadata driver, aggregates all other drivers into a single one.
4848 // Override `orm_default` only if you know what you're doing
49- 'orm_default' => array(
50- 'drivers' => array(
49+ 'orm_default' => [
50+ 'drivers' => [
5151 // register `my_annotation_driver` for any entity under namespace `My\Namespace`
52- 'My\Namespace' => 'my_annotation_driver'
53- )
54- )
55- )
56- )
57- ) ;
52+ 'My\Namespace' => 'my_annotation_driver',
53+ ],
54+ ],
55+ ],
56+ ],
57+ ] ;
5858```
5959
6060## Connection settings
@@ -63,23 +63,23 @@ Connection parameters can be defined in the application configuration:
6363
6464``` php
6565<?php
66- return array(
67- 'doctrine' => array(
68- 'connection' => array(
66+ return [
67+ 'doctrine' => [
68+ 'connection' => [
6969 // default connection name
70- 'orm_default' => array(
70+ 'orm_default' => [
7171 'driverClass' => 'Doctrine\DBAL\Driver\PDOMySql\Driver',
72- 'params' => array(
72+ 'params' => [
7373 'host' => 'localhost',
7474 'port' => '3306',
7575 'user' => 'username',
7676 'password' => 'password',
7777 'dbname' => 'database',
78- )
79- )
80- )
81- ) ,
82- ) ;
78+ ],
79+ ],
80+ ],
81+ ] ,
82+ ] ;
8383```
8484
8585#### Full configuration options
0 commit comments