Search the Community
Showing results for tags 'autoload'.
Found 1 result
I've been using composer and like the idea of having managed libraries/dependencies in php. I'm having trouble understanding how to call libraries with autoloading. Some of the package authors give great directions and some don't. Things seem very inconsistent which is really annoying. For example I'm using this image library like this: use Intervention\Image\ImageManager; $imgMan = new ImageManager(array('driver' => 'gd')); //etc... Awesome! But I can't figure out how to do something similar with firephp and mpdf (namespacing)? I figured out that these do work: $firephp = FirePHP::getInstance(true); $mpdf = new mpdf(); But, why all the inconsistencies and different ways of doing things? I'd like to keep everything neat and namespaced all in a similar way. Can anyone offer some advice?