Closed daveganley closed 12 years ago
I found this via: http://fuelphp.com/forums/topics/view/7487
Does the import autoloads just one file? Is there much benefit to this compared to Autoloader::add_class
or native require_once
?
Edit: this can also be considered as related: http://fuelphp.com/forums/topics/view/7285
This is just duplicating native PHP require behavior without any advantage: require APPPATH.'vendor/lib/somefile.php
is far superior to this.
Don't be afraid to use native PHP functionality when applicable: it's faster and less ambiguous code.
When trying to import vendor libs using import a error occurs. It would be good if this was possible with something like this in the core base.php
if ( ! function_exists('import')) { function import($path, $folder = 'classes') { $path = str_replace('/', DIRECTORY_SEPARATOR, $path);
}