前情提要 前面我们分析了插件列表,但是 html 部分我们没有分析,今天我们就来分析一下 url 生成部分。 正文开始 后台的 common.php 会加载 Security 组件。 先看 Security 的 execute 方法, 1 2 3 4 5 6 7 8 9 10 11 12 13 14 /** * 初始化函数 * */ public function execute() { $this->_options = $this->widget('Widget_Options'); $user = $this->widget('Widget_User'); $this->_token = $this->_options->secret; if ($user->hasLogin()) { $this->_token .= '&' . $user->authCode . '&' . $user->uid; } } 首先会加载 Options ,然后会加载 User 组件。 我们再去看 User 组……
阅读全文