public static function getMainInstance(DependencyContainer $dc = null) { if (empty(self::$_mainInstance)) { if (empty($dc)) { $dc = new DependencyContainer(); } DC::setInstance($dc); self::$_mainInstance = new static($dc); } return self::$_mainInstance; }