Pages

Wednesday, September 11, 2013

Cakephp-Difference in App:Uses(),App::import(),App::path()

App::uses() loads libraries using same standrds as cakephp folder structure i.e for files which follow the same standards regarding folder and file naming.

This is why it is not advisable to load vendor's using App::uses().

App::import() loads file if it has not been included before i.e. it is just a wrapper of include_once();

App::path() return the path of concerned cakephp folder

example: App::path('Vendor') return's path of vendor

No comments:

Post a Comment