public function __construct() { self::$obj =& $this; foreach (is_load() as $key => $value) { $this->{$key} =& load_class($value); } }
function &load_class($class = '') { static $_class = array(); if (isset($_class[$class])) { return $_class[$class]; } require_once $class . ".php"; is_load($class); $_class[$class] = new $class(); return $_class[$class]; }