/** * Get the single instance of the component handler. * @return ComponentHandler */ public static function Singleton() { if (is_null(self::$instance)) { //$cached = Core::Cache()->get('componenthandler'); $cached = false; if ($cached) { self::$instance = unserialize($cached); } else { self::$instance = new self(); // And cache this instance. //Core::Cache()->set('componenthandler', serialize(self::$instance), 10); } self::$instance->load(); } return self::$instance; }