Location: PHPKode > scripts > Application Framework Classes > application-framework-classes/datastructures.class.php
<?php
/* 
 *(c) 2003 christoph althammer hide@address.com  
 *         http://www.milpa.de
 *
 *         GNU GENERAL PUBLIC LICENSE
 *         die deutsche √úbersetzung der GPL ist zu finden auf www.suse.org.
 *
 *   auth: c. althammer
 *   date: 2002-10-25
 *   lc  : 2002-10-25
 *   comm: Data Structures
 * 
 *
 */
 
class DataStructure {
	var $DatabaseTable	= "";
	var $PrimaryKey		= "";
	var $Data			= array("Key"	=> "");
	
	
	function GetPrimaryKey(){
		return $this->PrimaryKey;	
	}
	
}/* end of class */



class Sample extends DataStructure {
	var $DatabaseTable	= "sampletable";
	var $PrimaryKey		= "pid";
	var $Data			= array("date"		=> "",
								"headline"	=> "",
								"option"	=> "",
								"body"		=> "",
								"stamp"		=> ""								
								);
								
function FormatStructAfterPost($Object=""){
	$Format = new FormatVar;
	$Object->date	= $Format->TextAfterPost($Object->date);	
	return $Object;
	}

function FormatStructForDb($Object=""){
	$Format = new FormatVar;
	$Object->date		= $Format->DateForDb($Object->date);	
	return $Object;
	}
function FormatStructFromDb($Object=""){
	new Debug("Format from Db");
	$Format = new FormatVar;
	$Object->date		= $Format->DateFromDb($Object->date);		
	return $Object;
	}
function FormatStructForOutput($Object=""){
	$Format = new FormatVar;
	$Object->date			= $Format->DateFromDb($Object->date);	
	return $Object;
	}
}/* end of class */




?>
Return current item: Application Framework Classes