Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Jackalope implementats PHPCR. This modular library contains bindings to store data with the doctrine DBAL or in the Jackrabbit JCR server part

This branch is 1 commit ahead and 0 commits behind master

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.md

Jackalope Build Status

A powerful implementation of the PHPCR API.

You can use Jackalope with different storage backends. For now, we support relational databases with the DoctrineDBAL backend, and the Jackrabbit server with the Jackrabbit backend.

There is a different factory for each backend, see below for an introduction.

Discuss on jackalope-dev@googlegroups.com or visit #jackalope on irc.freenode.net

License: This code is licenced under the apache license. Please see the file LICENSE in this folder.

Preconditions

Setup

See https://github.com/jackalope/jackalope/wiki/Downloads

Tests

See the wiki pages for how to set up testing: DoctrineDBAL | Jackrabbit.

Usage

The entry point is to create the repository factory. The factory specifies the storage backend as well.

// see the Doctrine factory for available parameters for the doctrine backend
// alternatively use \Jackalope\RepositoryFactoryDoctrineDBAL
$repository = \Jackalope\RepositoryFactoryJackrabbit::getRepository(array('jackalope.jackrabbit_uri' => 'http://localhost:8080/server'));
$credentials = new SimpleCredentials('username', 'password');
$session = $repository->login($credentials, 'default');

$rootNode = $session->getNode("/");
$whitewashing = $rootNode->addNode("www-whitewashing-de");
$session->save();

$posts = $whitewashing->addNode("posts");
$session->save();

$post = $posts->addNode("welcome-to-blog");
$post->addMixin("mix:title");
$post->setProperty("jcr:title", "Welcome to my Blog!");
$post->setProperty("jcr:description", "This is the first post on my blog! Do you like it?");

$session->save();

See https://github.com/phpcr/phpcr/blob/master/doc/Tutorial.md for how to use the PHPCR API

Implementation

See (doc/architecture.md) for an introduction how Jackalope is built. Have a look at the source files and generate the phpdoc.

Contributors

Something went wrong with that request. Please try again.