[eluser]gidarren[/eluser]
Hey all, I am using CodeIgniter 2 and hooks are not working... my hook isn't being activated at all.
I have hooks activated:
Code:
$config['enable_hooks'] = TRUE;
I have enable my hook in hooks.php:
Code:
$hook['post_controller_constructor'] = array(
'class' => 'Authorization',
'function' => 'authorize',
'filename' => 'Authorization.php',
'filepath' => 'hooks'
);
And finally I have my hook:
Code:
class Authorization {
private $CI;
function __construct()
{
$this->CI = get_instance();
}
function authorize()
{
echo 'This should be outputted!';
}
}
Does anyone know if I am doing anything wrong? The documentation does not provide a clear example.
Thanks,
Darren