<?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";
?>
|