php - Cakephp 3 loading vendor files -


in cakephp 2 when need vendor or related class loaded globally, adding require or app use inside bootstrap.php ot core php.

in cakephp 3 should require vendor files ? dont want declare vendor require in every class , template file use vendor files.

http://book.cakephp.org/3.0/en/core-libraries/app.html#loading-vendor-files

vendor files 3rdparty files. custom static utility classes not vendor files rather app files. can put them under src/lib/. ensure use proper namespace classes , add proper use statement wherever need use class.

for e.g. if lib class src/lib/foobar.php should have classname app\lib , "use" statement use app\lib\foobar.


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -