Home  >  Article  >  Backend Development  >  CI框架中Hooks类下面的 _in_progress变量作用

CI框架中Hooks类下面的 _in_progress变量作用

WBOY
WBOYOriginal
2016-06-06 20:12:06929browse

我使用的CI 3.0.4版本

问题:
不懂_in_progress变量的作用;防止死循环?
1、什么情况下才出现死循环?
2、为什么不是在_run_hooks函数的第一行就设置了呢?
3、is_call(data)情况下就没设置_in_progress变量呢?

这个变量作用和用法令我很不解,求解释下,谢谢。

回复内容:

我使用的CI 3.0.4版本

问题:
不懂_in_progress变量的作用;防止死循环?
1、什么情况下才出现死循环?
2、为什么不是在_run_hooks函数的第一行就设置了呢?
3、is_call(data)情况下就没设置_in_progress变量呢?

这个变量作用和用法令我很不解,求解释下,谢谢。

防止hooks之间相互调用造成死循环

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn