惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园_首页
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
G
Google Developers Blog
B
Blog
Engineering at Meta
Engineering at Meta
阮一峰的网络日志
阮一峰的网络日志
The Register - Security
The Register - Security
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 叶小钗
The Cloudflare Blog
The Hacker News
The Hacker News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
CXSECURITY Database RSS Feed - CXSecurity.com
雷峰网
雷峰网
F
Fortinet All Blogs
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
H
Hackread – Cybersecurity News, Data Breaches, AI and More
酷 壳 – CoolShell
酷 壳 – CoolShell
Last Week in AI
Last Week in AI
T
Threat Research - Cisco Blogs
A
About on SuperTechFans
量子位
Recorded Future
Recorded Future
博客园 - 三生石上(FineUI控件)
H
Help Net Security
Help Net Security
Help Net Security
P
Palo Alto Networks Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
T
Troy Hunt's Blog
W
WeLiveSecurity
V
Vulnerabilities – Threatpost
T
The Exploit Database - CXSecurity.com
Know Your Adversary
Know Your Adversary
Apple Machine Learning Research
Apple Machine Learning Research
Scott Helme
Scott Helme
N
News | PayPal Newsroom
AWS News Blog
AWS News Blog
D
DataBreaches.Net
Blog — PlanetScale
Blog — PlanetScale
MongoDB | Blog
MongoDB | Blog
B
Blog RSS Feed
腾讯CDC
J
Java Code Geeks
Microsoft Azure Blog
Microsoft Azure Blog
TaoSecurity Blog
TaoSecurity Blog
GbyAI
GbyAI
Y
Y Combinator Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
D
Docker

博客园 - sonicit

再写Javascript闭包 后台数据缓存的一点心得 C# 使用 Newtonsoft.Json 对DataTable转换中文乱码问题的解决 Vue 数据双向绑定的误区 关于JS Pormise的认识 关于jqGrid中GridUnload方法的困惑 Javascript异步编程的4种方法 SQLServer 获得所有表结构(包括表名及字段) ACE代码编辑器,代码提示,添加自定义数据 利用闭包向post回调函数传参数 在seajs中使用require加载静态文件的问题 jqGrid标题行与第一行之间有很大空白的问题解决。 关于bootstrapValidator提交问题的解决 心得(一) 使用心得(一) MSSQL获得表的字段名称及其参数 QeePHP View视图的默认变量与新增变量 Delphi 的内存操作函数(5): 复制内存 Windows 7 安装VS2008 SP1 失败
Controller_Abstract的改造
sonicit · 2015-06-07 · via 博客园 - sonicit

Controller_Abstract 是所有Controller的父类,改造它可以节省很多时间。

比如execute方法,execute是每个action执行时都在执行的方法。

function execute($action_name, array $args = array())
    {
        //如果action为login,imgcode,不判断登陆用户信息。省得在每个action中进行判断
        if (!in_array($this->_context->action_name, array("login", "imgcode"))){
            if (is_null($this->_app->currentUser())){
                return $this->_redirect(url('admin/login'));
            }
        }
}

posted @ 2015-06-07 10:22  sonicit  阅读(342)  评论(0)    收藏  举报

刷新页面返回顶部