<?php 

require_once 'includes/data-access/class-transaction.php';


class context_testing extends context {
	
	private $contextname = "testing"; 

	
	function context_testing(){
		
		//main::check_auth_session();
		
	}
	
	function index() {
		/*
		$test_array = array (
		  'bla' => 'blub',
		  'foo' => 'bar',
		  'another_array' => array (
		    'stack' => 'overflow',
		  ),
		);
		$xml = new SimpleXMLElement('<root/>');
		array_walk_recursive($test_array, array ($xml, 'addChild'));
		print $xml->asXML();
	*/	
		
		
		
		/*
		
		
		
		Transaction::beginTransaction();
		
		$e = new Entity("users");
		
		$e->username = 'testtransaction123467';
		$e->fullname = 'testtransaction';
		$e->passwd = 'testtransaction';
		$e->email = 'testtransaction';
		$e->organisationid = 1;
		$e->contact = 'asdasdsad';
		$e->languageid = 1;
		$e->active = 'false';
		
		$em = new EntityManager('users');
		
		$em->create($e);
		
		Transaction::commit();
		
		*/
		
		/*
		
		$e = new Entity("test");
		
		$e->bool = false;
		$e->num = 1;
		$e->text = 'ok';
		
		print_r($e);
		
		$em = new EntityManager('test');
		$em->create($e);
		*/
		
		$e = new Entity("test",6);
		
		$e->bool = null;
		$e->num = null;
		$e->text = null;
		
		$e->save();
		
		
		
	}
	
	
}
?>