我想弄清楚为什么 isset 不适用于 $this 变量?我正在使用 HMVC codeigniter 并尝试检查模块是否加载成功:
$this->load->module('welcome');
var_dump(isset($this->welcome));
print_r($this->welcome);
结果是:
bool(false) --- This is the result of isset. Below is result of var_dump
Welcome Object
(
[autoload] => Array
(
)
[load] => MY_Loader Object
(
[_module:protected] => welcome
[_ci_plugins] => Array
(
)
[_ci_cached_vars] => Array
(
)
... some other protected variables
[controller] => Welcome Object
*RECURSION*
)
)
为什么isset返回false?
holdtom