Skip to content

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

License

Notifications You must be signed in to change notification settings

starkj/jackalope

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jackalope

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 [email protected] 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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%