Port of the Java Content Repository (JCR) to PHP.
This repository contains interfaces for the PHPCR standard.
The JSR-283 specification defines an API for a Content Repository (CR). The PHP Content Repository Interfaces aims to provide that API in PHP. PHPCR is part of JSR-333, the next version of the Java Content Repository.
There is a bunch of information here: http://phpcr.github.io
PHP content repository is an API. That is, it defines a standardized way how to access and manipulate content. As with any general API, the main goal is to decouple the backend from the frontend. If you code against the PHPCR API, your code should run with all PHPCR implementations. David Nuescheler, the lead of JCR, provides the following advantages of using a content repository.
PHPCR is adapted from the Java Content Repository (JCR) standard because that is a widely used and well thought through standard. There exist a couple of implementations for PHPCR that you can use. See below for a list of known implementations.
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 expressiveness as the Java API. Most of the JSR-283/JSR-333 documentation and code examples should be usable as-is.
Main differences between PHPCR and JCR are
An exhaustive list of the differences between PHPCR and JCR is in the file doc/JCRTOPHPCR.txt
As PHPCR is an API definition, there is not much to test on it without an implementation. Nonetheless, there are a few concrete classes that do have unit tests. Simply run them with phpunit -c tests/
An API test suite for the functionality of PHPCR is available at https://github.com/phpcr/phpcr-api-tests/ All implementations have to test against this test suite to make sure they are interchangeable with each other.
Jackalope separates the content repository logic from the storage backend. Several backend drivers are currently being developed.
The following are a work in progress:
If you work on your own implementation, please let us know so we can add it here right away. Even if its not yet working, others might want to join in and help.
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. That version never tried to provide an API, but just implemented the Java interfaces literally.