Skip to content

Commit

Permalink
updating README.DOCTRINE.md
Browse files Browse the repository at this point in the history
  • Loading branch information
nacmartin committed Oct 24, 2011
1 parent afa4eb3 commit 6c8fac3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.DOCTRINE.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ You need both Jackalope with the DoctrineDBAL branch and Doctrine Common+DBAL in
));

// only necessary on the first run, creates the database:
$schema = \Jackalope\Transport\Doctrine\RepositorySchema::create();
$schema = \Jackalope\Transport\DoctrineDBAL\RepositorySchema::create();
foreach ($schema->toSQL($dbConn->getDatabasePlatform()) AS $sql) {
$dbConn->exec($sql);
}
Expand All @@ -42,7 +42,9 @@ You need both Jackalope with the DoctrineDBAL branch and Doctrine Common+DBAL in
The default workspace is automatically created when you first try to access it

<?php
$session = $repository->login(null, 'default'); //credentials where in dbConn, don't matter here
//credentials where in dbConn, don't matter here
$credentials = new \PHPCR\SimpleCredentials(null, null);
$session = $repository->login($credentials, 'default');
$workspace = $session->getWorkspace();
$workspace->createWorkspace('myworkspace');

Expand All @@ -52,7 +54,7 @@ Now you have a 'default' workspace and can start changing stuff:

<?php

$session = $repository->login(null, "default"); // credentials dont matter
$session = $repository->login($credentials, "default"); // credentials dont matter
$rootNode = $session->getNode("/");
$whitewashing = $rootNode->addNode("www-whitewashing-de");
$session->save();
Expand Down

0 comments on commit 6c8fac3

Please sign in to comment.