Login   Register  
PHP Classes
elePHPant
Icontem

File: simpleObjectDB2/example/step1-initStorage.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Ilya Nemihin  >  simpleObjectDB  >  simpleObjectDB2/example/step1-initStorage.php  >  Download  
File: simpleObjectDB2/example/step1-initStorage.php
Role: Example script
Content type: text/plain
Description: step1-initStorage
Class: simpleObjectDB
simple object database
Author: By
Last change:
Date: 2003-06-17 14:03
Size: 863 bytes
 

Contents

Class file image Download
<?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";
}

?>