Port of the Java Content Repository (JCR) to PHP.
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 271 commits behind phpcr:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Interfaces for the PHP Content Repository PHPCR.

The JSR-283 [1] specification defines an API for a Content Repository (CR).
The PHP Content Repository Interfaces aim to provide that API in PHP.

There is a bunch of information here:

Port Status
The PHPCR is following the Java Content Repository JCR API closely where
appropriate. In the points where Java and PHP differ, we tried to follow the
logic of PHP while keeping the spirit of the original API. The API has the same
expressivnes as the Java API.
Most of the JSR-283 documentation and code examples should be usable as-is.

Main differences between PHPCR and JCR are
* PHP has no method overloading. Same-name methods that differ only by
   parameter number and/or type have been merged into one method.
* PHP is weak typed, which makes the Value interface and the large number of
   almost-identical iterators obsolete.

An exhaustive list of the differences between PHPCR and JCR is in the file

API Tests
An API test suite for the functionality of PHPCR is available at
All implementations have to test against this test suite to make sure they
are interchangeable with each other.

The Jackalope project implements the PHPCR interfaces and maps requests to a
java Jackrabbit instance or to a relational database (WIP). [2]

The midgard project is working on implementing the PHPCR interfaces for
midgard2. [3]

TODO: evolution of JCR

The API was originally ported from Java to PHP by Karsten Dambekalns
with the help of others for the typo3/flow3 project.

A first attempt at a port of JSR-170 to php has been made by SimPCoRe, but it
seems no applications have been published. The project web site is still up [4]
That version never tried to provide an API, but just implemented the Java
interfaces literally.

[1] http://jcp.org/en/jsr/summary?id=283
[2] https://github.com/jackalope/jackalope
[3] https://github.com/bergie/phpcr-midgard2
[4] http://www.simpcore.org/