Cakephp Classroom image

Anil  Bist / Professional / Web Technology

 
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()

 
 
 
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)