Cakephp Classroom image

Anil  Bist / Professional / Web Technology

 
To post your Question Join Classroom
 
Lesson Topics's No:-  First|4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12|Last
Lessons:-Core Libraries

Utility App::uses(’String’, ’Utility’);
So basically the second param should simply match the folder path of the class file in core or app.
Note: Loading vendors usually means you are loading packages that do not follow conventions. For most
vendor packages using App::import() is recommended.
Loading files from plugins Loading classes in plugins works much the same as loading app and core
classes except you must specify the plugin you are loading from:
// Load the class Comment in app/Plugin/PluginName/Model/Comment.php
App::uses(’Comment’, ’PluginName.Model’);
// Load the class CommentComponent in app/Plugin/PluginName/Controller/Component/CommentComponent.App::uses(’CommentComponent’, ’PluginName.Controller/Component’);
Finding paths to packages using App::path()
static App::path(string $package, string $plugin = null)
Return type array
Used to read information stored path:
// return the model paths in your application
App::path(’Model’);
This can be done for all packages that are apart of your application. You can also fetch paths for a
plugin:
// return the component paths in DebugKit
App::path(’Component’, ’DebugKit’);
static App::paths()
Return type array
Get all the currently loaded paths from App. Useful for inspecting or storing all paths App knows
about. For a paths to a specific package use App::path()
static App::core(string $package)
Return type array
Used for finding the path to a package inside CakePHP:
// Get the path to Cache engines.
App::core(’Cache/Engine’);
static App::location(string $className)
Return type string

 
 
 
image
Anil  Bist

Skills    Cakephp

Qualifications :- High School - SLV, College/University - Graphic Era Deemed Univ University,
Location :-Dehradun,Dehradun,Uttarakhand,India
Description:-

I started my Professional Journey in 2006 with one of the Web Development Company in Bangalore and my 1st framework was "Ruby on Rail" as Web development and delivered around 5+ Projects using this platform. Then came another dimension as JEE/Sturst framework, Gradually I realized that I want to build something on my own and give my passion and energy on creating something different a
Explore

 

  Students (0)