Welcome Guest, Not a member yet? Register   Sign In
Merge $psr4 array
#1

Hello,
I am trying to merge additional routes from an external file with the $psr4 array. Is this possible?
Thank you
Reply
#2

This is how CodeIgniter loads its files from system/bootstrap.php
PHP Code:
// system/bootstrap.php

// Setup Framework Paths.
APPPATH
ROOTPATH
SYSTEMPATH
WRITEPATH
TESTPATH

// Load Constants and Common Files.
APPPATH    'Config/Constants.php';
APPPATH    'Common.php';
SYSTEMPATH 'Common.php';

// Load Autoloader and Modules.
SYSTEMPATH 'Config/AutoloadConfig.php';
APPPATH    'Config/Autoload.php';
SYSTEMPATH 'Modules/Modules.php';
APPPATH    'Config/Modules.php';

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

You might be able to extend the system/Autoloader/FileLocator.php and array_merge youtr file in there.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

I am not certain how to do that. Are you able to provide some guidance. Thank you!
Reply
#4

This explains it all.

CodeIgniter 4 User Guide - Extending CodeIgniter
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB