Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

36 lines (27 sloc) 1.265 kB
<?php
/**
* The config file is responsible to make class loading work and initialize a
* DocumentManagerHelper that contains the doctrine document manager with a
* Session of your phcpr implementation.
* The array $extraCommands can be used to inject implementation specific commands.
* Add instances of commands for eventual implementation specific commands to this array.
*/
require_once './bootstrap.php';
$extraCommands = array();
$extraCommands[] = new \Jackalope\Tools\Console\Command\JackrabbitCommand();
$params = array(
'jackalope.jackrabbit_uri' => 'http://localhost:8080/server/',
);
$workspace = 'default';
$user = 'admin';
$pass = 'admin';
/* bootstrapping the repository implementation. for jackalope, do this: */
$repository = \Jackalope\RepositoryFactoryJackrabbit::getRepository($params);
$credentials = new \PHPCR\SimpleCredentials($user, $pass);
$session = $repository->login($credentials, $workspace);
/* prepare the doctrine configuration */
$config = new \Doctrine\ODM\PHPCR\Configuration();
$dm = \Doctrine\ODM\PHPCR\DocumentManager::create($session, $config);
$helperSet = new \Symfony\Component\Console\Helper\HelperSet(array(
'dm' => new \Doctrine\ODM\PHPCR\Tools\Console\Helper\DocumentManagerHelper(null, $dm)
));
Jump to Line
Something went wrong with that request. Please try again.