pre_system hook |
[eluser]jonyr[/eluser]
Hi everybody, congratulations for this excellent forum. There are here very interesting information. I'm very new in codeigniter, so I reading a lot because I love this framework. I have the next question: Scenario: ---- /application/config/config.php ----- $config['enable_hooks'] = TRUE; ---- /application/config/hooks.php ---- $hook['pre_controller'] = array( 'class' => 'my_cache', 'function' => 'pre_cache', 'filename' => 'my_cache_hook.php', 'filepath' => 'hooks' ); How many times this function (pre_cache) will be executed, if I call this url http://mydomain.com/index.php/welcome/index ? (It is the default controller) To check this, in the constructor of my_cache class, I'm creating a file with a random name using file_put_contents. Something like this ----------------------------------------------------------- $file_name = microtime(true) . ".temp"; file_put_contents($some_path . $file_name, microtime(true); ----------------------------------------------------------- I am a bit confuse, Why two of this files are created? Could anyone help me to understand this? Thanks in advance. JonyR |
Messages In This Thread |
pre_system hook - by El Forum - 02-19-2010, 07:42 PM
pre_system hook - by El Forum - 02-19-2010, 09:16 PM
pre_system hook - by El Forum - 02-19-2010, 09:55 PM
pre_system hook - by El Forum - 02-19-2010, 10:04 PM
|