Cakephp Classroom image

osdyui
 
To post your Question Join Classroom
 
Lesson Topics's No:-  First|8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16|Last
Lessons:-Core Libraries

• To override the Model class, create app/Lib/Model/Model.php
When you load the replaced files, the app/Lib files will be loaded instead of the built-in core classes.
Loading Vendor Files
You can use App::uses() to load classes in vendors directories. It follows the same conventions as
loading other files:
// Load the class Geshi in app/Vendor/Geshi.php
App::uses(’Geshi’, ’Vendor’);
To load classes in subdirectories, you’ll need to add those paths with App::build():
// Load the class ClassInSomePackage in app/Vendor/SomePackage/ClassInSomePackage.php
App::build(array(’Vendor’ => array(APP . ’Vendor’ . DS . ’SomePackage’)));
App::uses(’ClassInSomePackage’, ’Vendor’);
Your vendor files may not follow conventions, have a class that differs from the file name or does not contain
classes. You can load those files using App::import(). The following examples illustrate how to load
vendor files from a number of path structures. These vendor files could be located in any of the vendor
folders.
To load app/Vendor/geshi.php:
App::import(’Vendor’, ’geshi’);
Note: The geshi file must be a lower-case file name as Cake will not find it otherwise.
To load app/Vendor/flickr/flickr.php:
App::import(’Vendor’, ’flickr/flickr’);
To load app/Vendor/some.name.php:
App::import(’Vendor’, ’SomeName’, array(’file’ => ’some.name.php’));
To load app/Vendor/services/well.named.php:
App::import(’Vendor’, ’WellNamed’, array(’file’ => ’services’ . DS . ’well.named.php’));
It wouldn’t make a difference if your vendor files are inside your /vendors directory. Cake will automatically
find it.
To load vendors/vendorName/libFile.php:
App::import(’Vendor’, ’aUniqueIdentifier’, array(’file’ => ’vendorName’ . DS . ’libFile.php’));
App Init/Load/Shutdown Methods
static App::init()

 
 
 

osdyui

Skills    Cakephp

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

  Students (0)