App.php -> public static function className

Hi there,

I’m a bit stuck and would like to see anyone has a solution for me.

I have a CakePHP 3 (3.8) application, which contains several plugins that act each one as an “application”.
I have a lot of common code that reside in src (common Controllers, Models, etc).

What I want to achieve ism if a controller does not exist in the plugin, the controller from src should be used.
The problem is the the function className() from App class, only searches within the plugin (if a plugin is set) or the Cake namespace.

Has anyone encountered this problem or anyone has an idea ?

Thank you !

I’m not sure if I grasp the setup and the arising issue completely. From what I understand you would set-up plugin-routes (pointing to existing plugin-controllers) and then a generic route which is handled by the main application which catches everything not caught by the plugin-routes?