public static function create($environment, $debug) { if (self::$_instance) { return self::$_instance; } $instance = new self(); $instance->environment = $environment; $instance->debug = (bool) $debug; $instance->registerModuleDirectory(realpath(__DIR__ . '/../../../')); self::$_instance = $instance; return $instance; }