can anyone give me a quick hand with namespaces and the UserFrosting environment?
To explain my issue, I'm using TCPDF to create a PDF document from data within UserFrosting. I've created a custom class, MyPDF, in the UserFrosting namespace so I can create a PDF within the UF namespace by typing $pdf = new MyPDF(blahblah);
and that works fine.
The issue is with the MyPDF class itself - I need to be able to reference config vars from UF and don't know how I can do that - i.e.:
namespace UserFrosting;
class MyPDF extends \TCPDF_TCPDF {
public function Header() {
$image_location = $this->_app->config('upload.path')
How can I access config
from within MyPDF
? :?:
I've tried:
class MyPDF extends \TCPDF_TCPDF {
public function Header() {
$ufapp = new UFModel();
$image_location = $ufapp->config('upload.path')
... but no dice. I'm getting this error:
Cannot instantiate abstract class UserFrosting\UFModel