Answer» - CodeIgniter’s hooks will provide a way to change the internal workings or framework FUNCTIONALITIES without any need for hacking the CORE files. It permits script execution with a particular path within the CodeIgniter.
- We can globally enable/disable the hooks feature by setting the below-given item in the application/config/config.php file: $config['enable_hooks'] = TRUE;
- It is defined in application/config/hooks.php file. For example:
$hook[‘pre_controller’] = array(‘class’ => ‘MyHookClass’,‘function’ => ‘Myhookfunction’,‘FILENAME’ => ‘MyHookClass.php’,‘filepath’ => ‘hooks’,‘params’ => array(‘test’, ‘test1’, ‘webs’));In the above code example, the ‘pre_controller‘ hook is called hook POINT. Various types of hook points are available in CodeIgniter.
|