<?php
//---[ simpleObjectDB ]---
// demo-step-1 "initStorage"
//
// create in given directory
// storage (root object)
//
$include_root = '../include/';
require_once( $include_root . 'functions/ClassLoader.php' );
load_class( 'PersistenceSystem/PersistenceSystem.php' );
$initParams = array();
$initParams["storageRoot"] = 'root2/'; // this directory will be created
// initialize by directory
$persistenceSystem = new PersistenceSystem( $initParams );
// create object
if ( $persistenceSystem->initStorage() ){
print 'storage in "' . $initParams["storageRoot"] . '"'.' was successful initialized'."\n";
print "persistence system information:\n";
foreach( $persistenceSystem->getSODBinformation() as $key=>$value ){
print "$key: $value\n";
}
}
else{
print 'Error: ' . $persistenceSystem->getError() . "\n";
}
?>
|