Welcome Guest, Not a member yet? Register   Sign In
Setting up FPDI_Protection in CI 4 [namespace giving me a challenge]
#2

you need to add the library path to autoload config and your classes to the classmap : https://codeigniter4.github.io/CodeIgnit...oader.html

your should psr4 looks like this:

PHP Code:
$psr4 = [
 
'Config'      => APPPATH 'Config',
 
APP_NAMESPACE => APPPATH               // For custom namespace
 
'App'         => APPPATH               // To ensure filters, etc still found,
 
'Libraries' => APPPATH.'Libraries',
 ]; 

and your classmap like this:

PHP Code:
$classmap = [
'FPDF'    => APPPATH.'Libraries/pdf/fpdf.php'
'FPDI'  
=> APPPATH.'Libraries/pdf/fpdi.php' 
]; 

not sure if you need both^^ but you should add your main class to the classmap, that is accessed from outside the pdf directory ( library )
Reply


Messages In This Thread
RE: Setting up FPDI_Protection in CI 4 [namespace giving me a challenge] - by puschie - 03-06-2019, 04:18 AM



Theme © iAndrew 2016 - Forum software by © MyBB