Cakephp Classroom image

pankaj
 
To post your Question Join Classroom
 
Lesson Topics's No:-  First|18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26|
Lessons:-Controllers

Component API
class Component
The base Component class offers a few methods for lazily loading other Components through
ComponentCollection as well as dealing with common handling of settings. It also provides
prototypes for all the component callbacks.
Component::__construct(ComponentCollection $collection, $settings = array())
Constructor for the base component class. All $settings that are also public properties will have
their values changed to the matching value in $settings.
Callbacks
Component::initialize(Controller $controller)
The initialize method is called before the controller’s beforeFilter method.
Component::startup(Controller $controller)
The startup method is called after the controller’s beforeFilter method but before the controller executes
the current action handler.
Component::beforeRender(Controller $controller)
The beforeRender method is called after the controller executes the requested action’s logic but before
the controller’s renders views and layout.
Component::shutdown(Controller $controller)
The shutdown method is called before output is sent to browser.
Component::beforeRedirect(Controller $controller, $url, $status=null, $exit=true)
The beforeRedirect method is invoked when the controller’s redirect method is called but before any
further action. If this method returns false the controller will not continue on to redirect the request.
The $url, $status and $exit variables have same meaning as for the controller’s method. You can also
return a string which will be interpreted as the url to redirect to or return associative array with key
‘url’ and optionally ‘status’ and ‘exit’.

 
 
 

pankaj

Skills    Cakephp

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

  Students (0)