ocramius/zfphpcrodmsample

This package is abandoned and no longer maintained. No replacement package was suggested.
There is no license information available for the latest version (dev-master) of this package.

Zend Framework 2 Example Module that shows how ocramius/ZfPhpcrOdm works

dev-master 2012-04-08 05:57 UTC

This package is auto-updated.

Last update: 2019-02-20 19:27:58 UTC


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