Closed destinydriven closed 11 years ago
A Quote from @lorenzo, one of the developers behind CakePHP:
Now, using
App::import()
for vendors is kind of silly, if you think about it. It is just an expensive, verbose and very > silly wrapper forrequire_once()
.In 2.0, we actually encourage people to use require or require_once for their Vendor libraries. You can get the location of the Vendor folder using
App::path('Vendor')
or justAPP . 'Vendor' . DS
.
So, using App::import() isn't really an improvement.
gabrielizaias, thank you for that heads up. I was always aware that App:import() was just an expensive wrapper for require() but I had not seen any instruction to replace it in Cake. I will change the pull request to reflect this and resubmit.