Cakephp Classroom image

osdyui
 
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

 
 
 

osdyui

Skills    Cakephp

Qualifications :-
Location :-,,,
Description:-
Explore
 

  Students (0)