【发布时间】:2013-07-22 11:20:11
【问题描述】:
我想为所有Controller实现一个语言Setter,需要在Routing to the Controller -> 前端Controller之前运行这个方法。
如果在我的控制器类中实现了一个方法,但对于某些用途,它必须在控制器初始化之前提前运行
class Controller extends CController
{
public function __construct($id, $module = null)
{
// Set the application language
if (isset($_GET['language']))
{
$lang = $_GET['language'];
【问题讨论】:
标签: yii front-controller