Location: PHPKode > scripts > RDF API > rdf-api/util/Object.php
<?php

// ----------------------------------------------------------------------------------
// Class: Object
// ----------------------------------------------------------------------------------

/**
 * An abstract object.
 * Root object with some general methods, that should be overloaded. 
 *
 * 
 * History:
 * 09-10-2002                : First version of this class.
 *
 * @version  V0.1
 * @author Chris Bizer <hide@address.com>
 *
 * @abstract
 * @package general
 *
 */
 class Object {
  
  /**
   * Generates the hashcode of an object using MD5
   *
   * @access	public
   * @return	string		
   */
  // 	function hashCode() {
  //		$objectvars = get_object_vars($this);
  //		foreach($objectvars as $key => $value) $content = $content . $key . $value;
  //		return md5(get_class($this) . $content); 	
  //	}

  /**
   * Serializes a object into a string
   *
   * @access	public
   * @return	string		
   */    
	function toString() {
    	$objectvars = get_object_vars($this);
		foreach($objectvars as $key => $value) $content = $content . $key ."='". $value. "'; ";
		return "Instance of " . get_class($this) ."; Properties: ". $content;
	}

 }


?>
Return current item: RDF API