[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[jfw] How to add third party package



Hi,

I would like to add the tcpdf package to my Joomla! Framework web app, but I'm getting stuck in the class load process.

I have unzipped the package and loaded the tcpdf folder inside vendor (the folder contains the tcpdf.php file that defines the TCPDF class and several other files and directories).
I have added to vendor/composer/autoload_namespaces.php, inside the return array(....). the line:
'tcpdf' => array($vendorDir . '/tcpdf'), 

In my Model I have added:
use tcpdf\tcpdf;

The scope is loading the TCPDF class defined in vendor/tcpdf/tcpdf.php.

Now when in my function I call a simple tcpdf function as:

TCPDF::setAuthor('Nicola Asuni);

or if I try $test=new TCPDF();

I obtain a 500 Error Page.

I don't want to run composer because the web app is already working and online and it's hosted on a server where I can't call composer (so I should run it locally and then overwrite files and directories on the server), so I'd like to manually get the class loaded.

What am I missing?

Thanks for any possible hint/suggestion.

Elena

--
Framework source code: https://github.com/joomla-framework
Visit http://developer.joomla.org for more information about developing with Joomla!
---
You received this message because you are subscribed to the Google Groups "Joomla! Framework Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-framework+unsubscribe AT googlegroups.com.
Visit this group at https://groups.google.com/group/joomla-dev-framework.