Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
PHPCR-ODM Zend Framework 2 Sample "Consumer" Module
PHP
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
config
src/ZfPhpcrOdmSample
view/document-manager
Module.php
README.md
autoload_register.php
composer.json

README.md

README

This is a sample Module demonstrating the ZfPhpcrOdm "Zend Framework 2 - Doctrine PHPCR-ODM bridge" functionality.

(VERY!) QUICK SETUP

Just do following:

# clone pre-configured skeleton
git clone -b zf-phpcr-odm-sample git://github.com/Ocramius/ZendSkeletonApplication.git --recursive
# fetch and run jackrabbit service
./ZendSkeletonApplication/module/ZfPhpcrOdm/library/doctrine-phpcr-odm/lib/vendor/jackalope/tests/vendor/vendors_jackrabbit.sh
# then point a virtualhost's documentroot to ZendSkeletonApplication/public

Running Examples

Just visit

DETAILED SETUP (when you understand it)

Dependencies

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/ZfPhpcrOdmSample.git modules/ZfPhpcrOdmSample
  3. open path/to/my/zf2application/config/application.config.php and add 'ZfPhpcrOdmSample' to your 'modules' configuration key (ensure it is placed after key 'ZfPhpcrOdm').
  4. adjust write permissions to allow php to write to following path:
    • path/to/my/zf2application/modules/ZfPhpcrOdmSample/src/ZfPhpcrOdmSample/Proxy

Configuration

A simple fresh instance of Jackrabbit running is enough to let this module run without configuration changes. It writes by default on workspace "default" and connects to localhost on port 8888 using simple authentication as user "admin" with password "admin". If you have set some password, or need to connect to a different host, just change the following module configurations:

'zfphpcrodm-jackrabbittransport' => array(
    'parameters' => array(
        'serverUri' => 'http://your-host:1234/server/',
    ),
),
'zfphpcrodm-credentials' => array(
    'parameters' => array(
        'userID' => 'username',
        'password' => 'secret',
    ),
),

Tuning for production

  • TODO
Something went wrong with that request. Please try again.