I'm wanting to use the mpdf library with symfony1.4
I have downloaded the library in to lib/vendor/mPDF
and I' have updated my autoload.yml
file in config/autoload.yml
to include the following:
mPDF:
name: mPDF
path: %SF_LIB_DIR%/vendor/mPDF
recursive: on
When I then instantiate the mPDF class,
$mdpf = new mPDF();
I get the following:
Fatal Error: Class 'mPDF' not found
Any ideas?
Your autoload file should be like this :
autoload:
mPDF:
path: %SF_LIB_DIR%/vendor/mPDF
You must have a first level with autoload
.
By the way, in your case, you just need to load one file, so you don't have to define the recursive: on
and the name
.