本文整理汇总了PHP中unknown_type::getControllerName方法的典型用法代码示例。如果您正苦于以下问题:PHP unknown_type::getControllerName方法的具体用法?PHP unknown_type::getControllerName怎么用?PHP unknown_type::getControllerName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类unknown_type
的用法示例。
在下文中一共展示了unknown_type::getControllerName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _redirect
/**
* redirect url to any in base url (currencysmart.localserver)
* @param unknown_type $request
* @param unknown_type $controller
* @param unknown_type $action
* @param unknown_type $module
*/
protected function _redirect($request, $controller, $action, $module)
{
if ($request->getControllerName() == $controller && $request->getActionName() == $action && $request->getModuleName() == $module) {
return TRUE;
}
$url = Zend_Controller_Front::getInstance()->getBaseUrl();
$url .= '/' . ($module .= $controller === 'index' ? '' : '/' . ($controller .= $action === 'index' ? '' : '/' . $action));
return $this->_response->setRedirect($url);
}
示例2: processActivity
/**
* process a traffic activity
*
* @param Model_User $user
* @param unknown_type $request
* @param unknown_type $description
*/
public function processActivity(Model_User $user, $request, $description = '')
{
$trafficActivity = array();
$trafficActivity['module'] = $request->getControllerName();
$trafficActivity['action'] = $request->getActionName();
$trafficActivity['description'] = $description;
$trafficActivity['date'] = date('Y-m-d H:i:s');
//Add traffic activity
$this->add($user, $trafficActivity);
}