Welcome Guest, Not a member yet? Register   Sign In
Call file / class from ThirdParty folder
#4

(This post was last modified: 11-25-2019, 04:34 PM by dave friend.)

(11-25-2019, 06:17 AM)StefenKhoe Wrote:
PHP Code:
$psr4 = [
 ...
 ...
 ...
 
'TP\Tools' => APPPATH 'ThirdParty/Foo.php'
 
]; 

The part shown above is not correct. The value should be a path to a folder - NOT to a file.

While trying to reproduce your problem here is what worked for me. Both
/app/ThirdParty/Foo.php and app/Controllers/User.php remain as you show in the OP. In fact, the only change is to what @MGatner did in /app/Config/Autoload.php. Here what I tried and it works.

PHP Code:
$psr4 = [
    
'Config'      => APPPATH 'Config',
    
APP_NAMESPACE => APPPATH,                // For custom namespace
    
'App'         => APPPATH,                // To ensure filters, etc still found,
    
'TP\Tools'    => APPPATH 'ThirdParty',
]; 
Reply


Messages In This Thread
RE: Call file / class from ThirdParty folder - by dave friend - 11-25-2019, 09:43 AM



Theme © iAndrew 2016 - Forum software by © MyBB