$name)) { // Call a singleton, if the get_instance method exists if (method_exists($class, 'get_instance')) { return $this->$name =& $class::get_instance(); } return $this->$name = new $class; } } } // -------------------------------------------------------------------------- /** * Convenience function to remove an object from the singleton * * @param string $name */ public function unload($name) { if (isset($this->$name)) { unset($this->$name); } } // -------------------------------------------------------------------------- /** * Convenience function to load config files * * @param string $name */ public function load_config($name) { $path = MM_APP_PATH . "config/{$name}.php"; if (is_file($path)) { require_once($path); } } } // End of miniMVC.php