Skip to content
This repository has been archived by the owner on Jul 17, 2020. It is now read-only.

Commit

Permalink
Compatibilizing library with ZF2 beta5
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocramius committed Jul 15, 2012
1 parent 66d2e40 commit 2719f37
Show file tree
Hide file tree
Showing 13 changed files with 617 additions and 704 deletions.
6 changes: 0 additions & 6 deletions .gitmodules

This file was deleted.

35 changes: 0 additions & 35 deletions Module.php

This file was deleted.

37 changes: 20 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,32 @@
README
======
# Zend Framework 2 to Doctrine PHPCR ODM integration
## Overview

This Module provides functionality to connect Zend Framework 2 ( http://packages.zendframework.com/ ) and Doctrine PHPCR-ODM ( https://github.com/doctrine/phpcr-odm ).
The module provides configuration and dependencies for both Jackrabbit and DBAL JCR backends.
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.

Dependencies
## Requirements
-------------
This module uses Zend Framework 2 and Doctrine PHPCR-ODM.
Doctrine PHPCR-ODM is required and provided as a git submodule, while a Zend Application skeleton () or similar structure should already be available.

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

## Setup

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

1. cd path/to/my/zf2application
2. git clone https://Ocramius@github.com/Ocramius/ZfPhpcrOdm.git modules/ZfPhpcrOdm --recursive
4. open path/to/my/zf2application/config/application.config.php and add 'ZfPhpcrOdm' to your 'modules' configuration key.
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

Configuration
-------------
## Usage

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

Examples
-------------
```php
<?php
$documentManager = $serviceLocator->get('Doctrine\ODM\PHPCR\DocumentManager');
```

## Examples

Please refer to https://github.com/Ocramius/ZfPhpcrOdmSample to see a working example of this module being used.
8 changes: 0 additions & 8 deletions autoload_classmap.php

This file was deleted.

12 changes: 0 additions & 12 deletions autoload_function.php

This file was deleted.

9 changes: 0 additions & 9 deletions autoload_register.php

This file was deleted.

4 changes: 2 additions & 2 deletions bin/phpcr.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
$previousDir = '.';
while (!file_exists('config/application.config.php')) {
$dir = dirname(getcwd());
if($previousDir === $dir) {
if ($previousDir === $dir) {
throw new RuntimeException(
'Unable to locate "config/application.config.php":'
. ' is DoctrineModule in a subdir of your application skeleton?'
Expand All @@ -32,4 +32,4 @@
$bootstrap = new Zend\Mvc\Bootstrap($defaultListeners->getConfigListener()->getMergedConfig());
$application = new Zend\Mvc\Application;
$bootstrap->bootstrap($application);
$application->getLocator()->get('zfphpcrodm-cli')->run();
$application->getLocator()->get('zfphpcrodm-cli')->run();
8 changes: 3 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,13 @@
"doctrine/doctrine-module": "dev-master"
},
"suggest": {
"midgard/phpcr": "Midgard2 adapter for PHPCR if you want to use midgard instead of dbal or jackrabbit"
"midgard/phpcr": "Midgard2 adapter for PHPCR if you want to use midgard instead of dbal or jackrabbit",
"ocramius/ocra-di-compiler": "Since the module uses Zend\\Di extensively, consider compiling it with OcraDiCompiler"
},
"autoload": {
"psr-0": {
"ZfPhpcrOdm": "src/"
},
"classmap": [
"./"
]
}
},
"config": {
"bin-dir": "bin"
Expand Down
Loading

0 comments on commit 2719f37

Please sign in to comment.