Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
22 lines (16 sloc) 770 Bytes
<?php
/* credentials you plan to use */
$url = 'http://127.0.0.1:8080/server/';
$workspace = 'default';
$user = 'admin';
$pass = 'admin';
/* bootstrapping the repository implementation. for jackalope, do this: */
$repository = \Jackalope\RepositoryFactoryJackrabbit::getRepository(array("jackalope.jackrabbit_uri" => $url));
$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)
));