• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.