File: simpleObjectDB2/example/step1-initStorage.php

Recommend this page to a friend!
  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: 17 years ago
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";
}

?>


For more information send a message to info at phpclasses dot org.