Pages

Showing posts with label app. Show all posts
Showing posts with label app. Show all posts

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

Cakephp-Why cakephp have two vendor folder?

The “vendors” folder in the “app” folder is for application-specifc third-party libraries whereas the other “vendors” folder is for libraries you want to use in multiple applications.