CI4 equivalent to CI3 magic autoloader - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: CI4 equivalent to CI3 magic autoloader (/showthread.php?tid=90491) |
CI4 equivalent to CI3 magic autoloader - b126 - 03-26-2024 Is there an equivalent in CI4 to the "magic" CI3 autoloading features? I know the \Config\Autoload.php from CI4 has nothing to do with it but cares about linking classnames to their full namespaces. I have then posted the question on SO but I am not sure it exists. https://stackoverflow.com/questions/78224987/how-to-autoload-a-user-defined-class-in-ci4 Thank you. RE: CI4 equivalent to CI3 magic autoloader - kenjis - 03-26-2024 What is the "magic" CI3 autoloading? If you want to load classes that are not PSR-4 compliant, use $classmap: https://codeigniter4.github.io/CodeIgniter4/concepts/autoloader.html#classmap |