Jackalope implementats PHPCR. This modular library contains bindings to store data with the doctrine DBAL or in the Jackrabbit JCR server part
Switch branches/tags
Nothing to show
Pull request Compare This branch is 1087 commits behind jackalope:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
api-test
doc
lib
src/Jackalope
tests
.gitignore
.gitmodules
IMPLEMENTATION
LICENSE
README.DOCTRINE.md
README.md
TODOS.DOCTRINE.md

README.md

Jackalope

Implementation of a PHP client for the Jackrabbit server, an implementation of the Java Content Repository JCR.

Implements the PHPCR interface (see http://phpcr.github.com for more about PHPCR).

http://liip.to/jackalope

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

Usage

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

$factoryclass = 'Jackalope\RepositoryFactoryJackrabbit';
$factory = new $factoryclass;
$repository = $factory->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

Tests

Our continuos integration server with coverage reports at: http://bamboo.liip.ch/browse/JACK

Running the api tests

Run phpunit with the configuration in api-tests phpunit -c /path/to/jackalope/api-tests

You should see mostly success, but there might be the odd error or failure

There are two kind of tests. The folder api-tests contains the phpcr-api-tests suite to test against the specification. This is what you want to look at when using jackalope as a PHPCR implementation.

The folder tests contains unit tests for the jackalope implementation. You should only need those if you want to debug jackalope itselves or implement new features. Again, make sure you have the test workspace in jackrabbit.

The phpunit.xml in api-tests runs all tests, both the unit and the api tests. The phpunit.xml in tests runs only the unit tests.

Contributors