1.

Give the list of hooks available in CodeIgniter.

Answer»

The list of available hook points are given below:

  • pre_system: It is called initially during system execution.
  • pre_controller: It is called immediately before any of the controllers being called. Example:
$hook['pre_controller'] = array( 'class' => 'ExampleClass', 'function' => 'Examplefunction', 'filename' => 'ExampleClass.php', 'filepath' => 'hooks', 'params' => array('mango', 'apple', 'orange') );
  • post_controller_constructor: It is called soon after INSTANTIATING your controller, but before any occurrence of the method call.
  • post_controller: It is called immediately after the complete execution of the controller.
  • display_override: It overrides the _display() method.
  • cache_override: It ENABLES calling of the user-defined method instead of _display_cache() method which is available in the OUTPUT Library. This permits you for USING your own cache display mechanism.
  • post_system: It is called soon after the final rendered page has been submitted to the web browser, at the end of system execution when the final data has been SENT to the browser.


Discussion

No Comment Found