2017 © Pedro Peláez
 

library phpcr

PHP Content Repository interfaces

image

phpcr/phpcr

PHP Content Repository interfaces

  • Monday, March 12, 2018
  • by dbu
  • Repository
  • 33 Watchers
  • 391 Stars
  • 854,217 Installations
  • PHP
  • 15 Dependents
  • 0 Suggesters
  • 36 Forks
  • 4 Open issues
  • 23 Versions
  • 4 % Grown

The README.md

PHP Content Repository PHPCR Test application

This repository contains interfaces for the PHPCR standard., (*1)

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., (*2)

There is a bunch of information here: http://phpcr.github.io, (*3)

Documentation

Introduction

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., (*4)

  • Functional Definition of a “Content Repository”
  • Common Vocabulary!
  • No longer learn (dozens of) (ugly) proprietary APIs
  • Write (mostly) portable code, for Document Management, Web Content Management, Source Code Control
  • Compare Repository Functionality
  • No more information silos and vendor Lock-in Content-Centric Infrastructure

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., (*5)

Further reading

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 expressiveness as the Java API. Most of the JSR-283/JSR-333 documentation and code examples should be usable as-is., (*6)

Main differences between PHPCR and JCR are, (*7)

  • 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 doc/JCR_TO_PHPCR.txt, (*8)

Tests

Unit tests

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/, (*9)

API 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., (*10)

Implementations

Jackalope separates the content repository logic from the storage backend. Several backend drivers are currently being developed., (*11)

  • Jackalope-Jackrabbit: Mapping requests to a java Jackrabbit instance. To day the most feature complete implementation.
  • Jackalope-DoctrineDBAL: Storing data in a relational database using the Doctrine Database Abstraction Layer.

The following are a work in progress:, (*12)

  • Jackalope-MongoDB: Storing data in a MongoDB database.
  • Jackalope-Prismic: Storing data in the Prismic.io content repository as a service.
  • Jackalope-Midgard1 (not online afaik): Read access to the midgard 1.0 server.
  • Midgard2: PHPCR interfaces for the midgard2 content repository.

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., (*13)

Utilities

  • phpcr-utils: A couple of utility classes and console commands to work with phcpr, independent of the implementation.
  • PHPCR Shell: The PHPCR Shell aims to provide a complete shell interface to any PHPCR repository.
  • Marmelab PHPCR Browser: Angular JS based PHPCR repository browser. Currently only supports Jackalope-Jackrabbit and Jackalope-Doctrine-DBAL.

Dependencies

PHPCR provides a composer.json for Composer and is available through Packagist., (*14)

History

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

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., (*16)

The Versions

12/03 2018

dev-master

9999999-dev http://phpcr.github.io

PHP Content Repository interfaces

  Sources   Download

MIT Apache-2.0

The Requires

  • php ^5.6|^7.0

 

The Development Requires

by David Buchmann
by Lukas Kahwe Smith
by Karsten Dambekalns

phpcr contentrepository

08/02 2017

2.1.4

2.1.4.0 http://phpcr.github.io

PHP Content Repository interfaces

  Sources   Download

MIT Apache-2.0

The Requires

  • php ^5.6|^7.0

 

The Development Requires

by David Buchmann
by Lukas Kahwe Smith
by Karsten Dambekalns

phpcr contentrepository

30/01 2017

2.1.3

2.1.3.0 http://phpcr.github.io

PHP Content Repository interfaces

  Sources   Download

MIT Apache-2.0

The Requires

  • php ^5.6|^7.0

 

The Development Requires

by David Buchmann
by Lukas Kahwe Smith
by Karsten Dambekalns

phpcr contentrepository

18/11 2015

dev-fix-typehints

dev-fix-typehints http://phpcr.github.io

PHP Content Repository interfaces

  Sources   Download

MIT Apache-2.0

The Requires

  • php >=5.3.0

 

by David Buchmann
by Lukas Kahwe Smith
by Karsten Dambekalns

phpcr contentrepository

10/02 2015

dev-acl

dev-acl http://phpcr.github.io

PHP Content Repository interfaces

  Sources   Download

MIT Apache-2.0

The Requires

  • php >=5.3.0

 

by David Buchmann
by Lukas Kahwe Smith
by Karsten Dambekalns

phpcr contentrepository

08/12 2014

2.1.2

2.1.2.0 http://phpcr.github.io

PHP Content Repository interfaces

  Sources   Download

MIT Apache-2.0

The Requires

  • php >=5.3.0

 

by David Buchmann
by Lukas Kahwe Smith
by Karsten Dambekalns

phpcr contentrepository

11/05 2014

dev-query_constants

dev-query_constants http://phpcr.github.io

PHP Content Repository interfaces

  Sources   Download

MIT Apache-2.0

The Requires

  • php >=5.3.0

 

by David Buchmann
by Lukas Kahwe Smith
by Karsten Dambekalns

phpcr contentrepository

03/03 2014

2.1.1

2.1.1.0 http://phpcr.github.io

PHP Content Repository interfaces

  Sources   Download

MIT Apache-2.0

The Requires

  • php >=5.3.0

 

by David Buchmann
by Lukas Kahwe Smith
by Karsten Dambekalns

phpcr contentrepository

07/10 2013

2.1.0

2.1.0.0 http://phpcr.github.io

PHP Content Repository interfaces

  Sources   Download

MIT Apache-2.0

The Requires

  • php >=5.3.0

 

by David Buchmann
by Lukas Kahwe Smith
by Karsten Dambekalns

phpcr contentrepository

07/10 2013

2.1.0-RC2

2.1.0.0-RC2 http://phpcr.github.io

PHP Content Repository interfaces

  Sources   Download

MIT Apache-2.0

The Requires

  • php >=5.3.0

 

by David Buchmann
by Lukas Kahwe Smith
by Karsten Dambekalns

phpcr contentrepository

25/09 2013

2.1.0-RC1

2.1.0.0-RC1 http://phpcr.github.io

PHP Content Repository interfaces

  Sources   Download

MIT Apache-2.0

The Requires

  • php >=5.3.0

 

by David Buchmann
by Lukas Kahwe Smith
by Karsten Dambekalns

phpcr contentrepository

26/07 2013

2.1.0-beta12

2.1.0.0-beta12 http://phpcr.github.com

PHP Content Repository interfaces

  Sources   Download

Apache-2.0

The Requires

  • php >=5.3.0

 

by David Buchmann
by Lukas Kahwe Smith
by Karsten Dambekalns

phpcr contentrepository

07/06 2013

2.1.0-beta11

2.1.0.0-beta11 http://phpcr.github.com

PHP Content Repository interfaces

  Sources   Download

Apache-2.0

The Requires

  • php >=5.3.0

 

by David Buchmann
by Lukas Kahwe Smith
by Karsten Dambekalns

phpcr contentrepository

03/05 2013

2.1.0-beta10

2.1.0.0-beta10 http://phpcr.github.com

PHP Content Repository interfaces

  Sources   Download

Apache-2.0

The Requires

  • php >=5.3.0

 

by David Buchmann
by Lukas Kahwe Smith
by Karsten Dambekalns

phpcr contentrepository

10/03 2013

2.1.0-beta9

2.1.0.0-beta9 http://phpcr.github.com

PHP Content Repository interfaces

  Sources   Download

Apache-2.0

The Requires

  • php >=5.3.0

 

by David Buchmann
by Lukas Kahwe Smith
by Karsten Dambekalns

phpcr contentrepository

12/01 2013

2.1.0-beta8

2.1.0.0-beta8 http://phpcr.github.com

PHP Content Repository interfaces

  Sources   Download

Apache-2.0

The Requires

  • php >=5.3.0

 

by David Buchmann
by Lukas Kahwe Smith
by Karsten Dambekalns

phpcr contentrepository

14/11 2012

2.1.0-beta7

2.1.0.0-beta7 http://phpcr.github.com

PHP Content Repository interfaces

  Sources   Download

Apache-2.0

The Requires

  • php >=5.3.0

 

by David Buchmann
by Lukas Kahwe Smith
by Karsten Dambekalns

phpcr contentrepository

24/09 2012

2.1.0-beta6

2.1.0.0-beta6 http://phpcr.github.com

PHP Content Repository interfaces

  Sources   Download

Apache-2.0

The Requires

  • php >=5.3.0

 

by David Buchmann
by Lukas Kahwe Smith
by Karsten Dambekalns

phpcr contentrepository

12/09 2012

2.1.0-beta5

2.1.0.0-beta5 http://phpcr.github.com

PHP Content Repository interfaces

  Sources   Download

Apache-2.0

The Requires

  • php >=5.3.0

 

by David Buchmann
by Lukas Kahwe Smith
by Karsten Dambekalns

phpcr contentrepository

27/06 2012

2.1.0-beta4

2.1.0.0-beta4 http://phpcr.github.com

PHP Content Repository interfaces

  Sources   Download

Apache-2.0

The Requires

  • php >=5.3.0

 

by David Buchmann
by Lukas Kahwe Smith
by Karsten Dambekalns

phpcr contentrepository

10/02 2012

2.1.0-beta3

2.1.0.0-beta3 http://phpcr.github.com

PHP Content Repository interfaces

  Sources   Download

Apache License 2.0

The Requires

  • php >=5.3.0

 

by David Buchmann
by Lukas Kahwe Smith
by Karsten Dambekalns

phpcr contentrepository

12/12 2011

2.1.0-beta2

2.1.0.0-beta2 http://phpcr.github.com

PHP Content Repository interfaces

  Sources   Download

Apache License 2.0

The Requires

  • php >=5.3.0

 

by David Buchmann
by Lukas Kahwe Smith
by Karsten Dambekalns

phpcr contentrepository

01/11 2011

2.1.0-beta1

2.1.0.0-beta1 http://phpcr.github.com

PHP Content Repository interfaces

  Sources   Download

Apache License 2.0

The Requires

  • php >=5.3.0

 

by David Buchmann
by Lukas Kahwe Smith
by Karsten Dambekalns

phpcr contentrepository