Cakephp Classroom image

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

Returns the package name where a class was defined to be located at.
Adding paths for App to find packages in
static App::build(array $paths = array(), mixed $mode = App::PREPEND)
Return type void
Sets up each package location on the file system. You can configure multiple search paths for each
package, those will be used to look for files one folder at a time in the specified order. All paths should
be terminated with a directory separator.
Adding additional controller paths for example would alter where CakePHP looks for controllers.
This allows you to split your application up across the filesystem.
Usage:
//will setup a new search path for the Model package
App::build(array(’Model’ => array(’/a/full/path/to/models/’)));
//will setup the path as the only valid path for searching models
App::build(array(’Model’ => array(’/path/to/models/’)), App::RESET);
//will setup multiple search paths for helpers
App::build(array(’View/Helper’ => array(’/path/to/helpers/’, ’/another/path/’)));
If reset is set to true, all loaded plugins will be forgotten and they will be needed to be loaded again.
Examples:
App::build(array(’controllers’ => array(’/full/path/to/controllers’)));
//becomes
App::build(array(’Controller’ => array(’/full/path/to/Controller’)));
App::build(array(’helpers’ => array(’/full/path/to/views/helpers’)));
//becomes
App::build(array(’View/Helper’ => array(’/full/path/to/View/Helper’)));
Changed in version 2.0: App::build() will not merge app paths with core paths anymore.
Add new packages to an application App::build() can be used to add new package locations. This
is useful when you want to add new top level packages or, sub-packages to your application:
App::build(array(
’Service’ => array(’%s’ . ’Service’ . DS)
), App::REGISTER);
The %s in newly registered packages will be replaced with the APP path. You must include a trailing / in
registered packages. Once packages are registered, you can use App::build() to append/prepend/reset
paths like any other package. Changed in version 2.1: Registering packages was added in 2.1

 
 
 

osdyui

Skills    Cakephp

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

  Students (0)