zf2 module.php中实现redirect
来源:互联网 发布:namecheap域名购买 编辑:程序博客网 时间:2024/04/30 06:46
public function onBootstrap($e){ $e->getApplication()->getEventManager()->getSharedManager()->attach('Zend\Mvc\Controller\AbstractActionController', 'dispatch', function($e) { $controller = $e->getTarget(); if (something.....) { $controller->plugin('redirect')->toRoute('yourroute');
$controller->plugin('redirect')->to
Url($url);
} }, 100);}
For mor info visit http://framework.zend.com/manual/2.1/en/modules/zend.event-manager.event-manager.html.
0 0
- zf2 module.php中实现redirect
- PHP Study- Issue 1 -Redirect Unable to load the module
- 在Zf2中实现Controller按照URL自动注册
- Drupal Module - Taxonomy redirect
- 解决php zf2中redis调用提示'RedisException' with message 'read error on connection'
- ZF2开发中常用操作
- ZF2开发中常用操作
- 在ZF2中实现Zend Framework的Controller init/preDispatch/postDispatch方法
- 在ZF2中实现Zend Framework的Controller init/preDispatch/postDispatch方法
- 在ZF2中实现Zend Framework的Controller init/preDispatch/postDispatch方法
- 在zf2 中 使用自定义视图助手
- Yii整合ZF2中Feed模块
- PHP Redirect操作
- Zend Framework2 - 在 Module.php中检查管理是否登录,而不是到控制器中检查 (实现方法示例)
- 在MogileFS中使用nginx代替perlbal实现internal redirect
- 在MogileFS中使用nginx代替perlbal实现internal redirect
- ZF2 Session简单使用(Zend\Authentication\Storage\Session.php)
- Struts2中redirect
- Error Code: 1175 You are using safe update mode and you tried to update a table without a WHERE that
- testtesttesttesttesttesttesttest
- python的基本操作(列表,元组)
- 浅析Java虚拟机结构与机制
- 关于oracle的任务进程提交后不执行原因
- zf2 module.php中实现redirect
- 异步提交form的时候利用jQuery validate实现表单验证
- 王垠:《程序员的心理疾病》
- Android学习之Shader渲染
- VMware Workstation 11.0.0正式版/注册码/注册机
- 隐藏StatusBar/TabBar/导航滑动返回
- ios 本地通知
- Android 一个将当前屏幕保存为图片文件的类
- test123456test123456test123456test123456