2017 © Pedro Peláez
 

library neo4j-ogm-module

Neo4jPHP OGM Module for Zend Framework 2

image

opensoftstudio/neo4j-ogm-module

Neo4jPHP OGM Module for Zend Framework 2

  • Tuesday, May 13, 2014
  • by opensoftstudio
  • Repository
  • 2 Watchers
  • 5 Stars
  • 985 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 1 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Neo4jPHP OGM Module for Zend Framework 2

Intended for use with Neo4jPHP Object Graph Mapper, integrates Neo4jPHP OGM with Zend Framework 2 quickly and easily., (*1)

Quick Start

Install with Composer, see getcomposer.org., (*2)

{
    "require": {
        "php": ">=5.3.3",
        "zendframework/zendframework": "2.3.*",
        "doctrine/doctrine-orm-module": "0.*",
        "everyman/neo4jphp": "dev-master",
        "hirevoice/neo4jphp-ogm": "dev-master",
        "opensoftstudio/neo4j-ogm-module": "dev-master"
    }
}
php composer.phar install

Then add DoctrineModule, DoctrineORMModule and Neo4jOGMModule to your config/application.config.php and create directory data/Neo4jOGMModule/Proxy and make sure your application has write access to it., (*3)

Entity Manager settings

To disable proxy regeneration on each request or to use a cached instance of doctrine's annotation reader, add to your module/config/module.config.php. Neo4jOGMModule is deployed with proxy regeneration enabled and annotation reader disabled., (*4)

<?php
return array(
    'neo4j' => array(
        'entitymanager' => array(
            'ogm_default' => array(
                // 'debug' => true, // Force proxy regeneration on each request
                // 'annotation_reader' => false,
            ),
        ),
    ),
);

Connection settings

Connection parameters to your Neo4j database can be defined in your config/autoload/local.php configuration:, (*5)

<?php
return array(
    'neo4j' => array(
        'connection' => array(
            'ogm_default' => array(
                'params' => array(
                    'transport' => 'curl', // or 'stream'
                    'host' => 'localhost',
                    'port' => 7474,
                    //'username' => null,
                    //'password' => null,
                ),
            ),
        ),
    ),
);

Service Locator

To access the entity manager, use the main service locator:, (*6)

$em = $this->getServiceLocator()->get('neo4j.entitymanager.ogm_default');
$em = $this->getServiceLocator()->get('Neo4j\OGM\EntityManager');

The Versions

13/05 2014