PHPackages                             ocramius/zf-phpcr-odm - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. ocramius/zf-phpcr-odm

AbandonedArchivedLibrary[Database &amp; ORM](/categories/database)

ocramius/zf-phpcr-odm
=====================

Zend Framework 2 Module that provides Doctrine PHPCR ODM functionality

61061[1 PRs](https://github.com/Ocramius/ZfPhpcrOdm/pulls)PHP

Since Mar 9Pushed 13y ago2 watchersCompare

[ Source](https://github.com/Ocramius/ZfPhpcrOdm)[ Packagist](https://packagist.org/packages/ocramius/zf-phpcr-odm)[ RSS](/packages/ocramius-zf-phpcr-odm/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Zend Framework 2 to Doctrine PHPCR ODM integration
==================================================

[](#zend-framework-2-to-doctrine-phpcr-odm-integration)

Overview
--------

[](#overview)

This Module provides functionality to connect [Zend Framework 2](https://github.com/zendframework/zf2) and [Doctrine PHPCR-ODM](https://github.com/doctrine/phpcr-odm). It provides configuration and dependencies for both Jackrabbit and DBAL JCR backends, and allows usage with Midgard2 too.

Requirements
------------

[](#requirements)

---

The module runs on any typical [Zend Framework 2 Skeleton application](https://github.com/zendframework/ZendSkeletonApplication)setup.

Setup
-----

[](#setup)

Following steps are necessary to get this project working (considering a zf2-skeleton or very similar application)

1. add `"ocramius/zf-phpcr-odm": "dev-master"` to your `composer.json` (`"minimum-stability": "dev"` is also required)
2. Add `DoctrineModule` and `ZfPhpcrOdm` to the enabled modules list
3. create directory `my/project/directory/data/ZfPhpcrOdm/Proxy` and make sure your application has write access to it. This directory can be changed using the module options.

Usage
-----

[](#usage)

This module allows you to simply ask the default application's `ServiceLocator` for an instance of `Doctrine\ODM\PHPCR\DocumentManager`:

```
