Welcome Guest, Not a member yet? Register   Sign In
Hooks
#2

All information regarding hooks can be found in the userguide.
https://codeigniter.com/user_guide/general/hooks.html

There are ment to be executed before or after "big things" happen.
https://codeigniter.com/user_guide/gener...ook-points

I got three hooks. Load different language, load global constants and check if a user are logged in.
PHP Code:
$hook['post_controller_constructor'] = array(
    
'function' => 'language_loader',
    
'filename' => 'language_loader.php',
    
'filepath' => 'hooks'
);

$hook['pre_system'] = array(
    
'function' => 'auth_constants',
    
'filename' => 'auth_constants.php',
    
'filepath' => 'hooks'
);
$hook['post_system'] = array(
    
'function' => 'auth_sess_check',
    
'filename' => 'auth_sess_check.php',
    
'filepath' => 'hooks'
); 
Reply


Messages In This Thread
Hooks - by kamrul6665 - 01-30-2020, 07:05 AM
RE: Hooks - by jreklund - 01-30-2020, 11:25 AM
RE: Hooks - by jerinho - 01-26-2022, 02:34 AM
RE: Hooks - by InsiteFX - 01-27-2022, 01:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB