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

[eluser]Marcus Cavalcanti[/eluser]
Hooks is a very helpful feature of CI, but i have one question about Hooks.

Exists a way to define the specific controllers/methods of a hook?

Example:
Code:
$hook['pre_controller'] = array(
        'class'     => 'MyClass',
        'function'     => 'Myfunction',
        'filename'     => 'Myclass.php',
        'filepath'     => 'hooks',
        'params'    => array('beer', 'wine', 'snacks')
        'controller_methods' => array('user/add' , 'blog/views' , 'pool/vote')
        );

In the example below the hook works only for controllers/methods in "controller_methods" attributes. It is like a filter works, but filter is "deprecated".

Thanks


Messages In This Thread
Hooks Question - by El Forum - 07-19-2007, 03:09 PM
Hooks Question - by El Forum - 07-20-2007, 02:56 AM



Theme © iAndrew 2016 - Forum software by © MyBB