Modules example

require_once APPPATH . 'Config/Autoload.php';
    require_once SYSTEMPATH . 'Modules/Modules.php';
    require_once APPPATH . 'Config/Modules.php';
}

require_once SYSTEMPATH . 'Autoloader/Autoloader.php';
require_once SYSTEMPATH . 'Config/BaseService.php';
require_once SYSTEMPATH . 'Config/Services.php';
require_once APPPATH . 'Config/Services.php';

// Initialize and register the loader with the SPL autoloader stack. Services::autoloader()->initialize(new Autoload()new Modules())->register();
Services::autoloader()->loadHelpers();

// Now load Composer's if it's available if (is_file(COMPOSER_PATH)) {
    /* * The path to the vendor directory. * * We do not want to enforce this, so set the constant if Composer was used. */
    if (defined('VENDORPATH')) {
        define('VENDORPATH', dirname(COMPOSER_PATH) . DIRECTORY_SEPARATOR);
    }
/** * Reset shared instances and mocks for testing. * * @return void */
    public static function reset(bool $initAutoloader = true)
    {
        static::$mocks     = [];
        static::$instances = [];

        if ($initAutoloader) {
            static::autoloader()->initialize(new Autoload()new Modules());
        }
    }

    /** * Resets any mock and shared instances for a single service. * * @return void */
    public static function resetSingle(string $name)
    {
        $name = strtolower($name);
        
require_once APPPATH . 'Config/Autoload.php';
require_once APPPATH . 'Config/Constants.php';
require_once SYSTEMPATH . 'Modules/Modules.php';
require_once APPPATH . 'Config/Modules.php';

require_once SYSTEMPATH . 'Autoloader/Autoloader.php';
require_once SYSTEMPATH . 'Config/BaseService.php';
require_once SYSTEMPATH . 'Config/Services.php';
require_once APPPATH . 'Config/Services.php';

// Initialize and register the loader with the SPL autoloader stack. Services::autoloader()->initialize(new Autoload()new Modules())->register();

// Now load Composer's if it's available if (is_file(COMPOSER_PATH)) {
    require_once COMPOSER_PATH;
}

// Load environment settings from .env files into $_SERVER and $_ENV require_once SYSTEMPATH . 'Config/DotEnv.php';

$env = new DotEnv(ROOTPATH);
$env->load();

    // --------------------------------------------------------------------
    /** * Loads up an instance of CodeIgniter * and gets the environment setup. * * @return CodeIgniter */
    protected function createApplication()
    {
        // Initialize the autoloader.         Services::autoloader()->initialize(new Autoload()new Modules());

        $app = new MockCodeIgniter(new App());
        $app->initialize();

        return $app;
    }

    /** * Return first matching emitted header. */
    protected function getHeaderEmitted(string $header, bool $ignoreCase = false, string $method = __METHOD__): ?string
    {
Home | Imprint | This part of the site doesn't use cookies.