File: simpleObjectDB2/example/step2-getObjectInfo.php

Recommend this page to a friend!
  Classes of Ilya Nemihin  >  simpleObjectDB  >  simpleObjectDB2/example/step2-getObjectInfo.php  >  Download  
File: simpleObjectDB2/example/step2-getObjectInfo.php
Role: Example script
Content type: text/plain
Description: step2-getObjectInfo
Class: simpleObjectDB
simple object database
Author: By
Last change:
Date: 17 years ago
Size: 1,036 bytes
 

Contents

Class file image Download
<?php

//---[ simpleObjectDB ]---
// demo-step-2 "getObjectInfo"
//
// show information about 'root' object
//
//

$include_root = '../include/';
require_once(
$include_root . 'functions/ClassLoader.php' );
load_class( 'PersistenceSystem/PersistenceSystem.php' );

$initParams = array();
$initParams["storageRoot"] = 'root2/';

// initialize by directory
$persistenceSystem = new PersistenceSystem( $initParams );

$oid = 'root';

$object = $persistenceSystem->getObject( $oid );


$SODBversion = $object->getField('SODBversion');

$object_id = $object->getID();
$objects_of_object = $object->getObjects();
$object_oid = $object->getOID();

print
"request for oid: [$oid]\n";
print
"we get object, information:\n";
print
"object's id: [$object_id]\n";
print
"object's oid: [$object_oid]\n";
print
"object contains objects: [". join( ',', $objects_of_object ) ."]\n";

// root object have information about version of
// SODB when it was created
print "root's SODBversion: $SODBversion \n";


?>


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