本文整理汇总了PHP中Mage_Core_Controller_Request_Http::getModuleName方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Controller_Request_Http::getModuleName方法的具体用法?PHP Mage_Core_Controller_Request_Http::getModuleName怎么用?PHP Mage_Core_Controller_Request_Http::getModuleName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Core_Controller_Request_Http
的用法示例。
在下文中一共展示了Mage_Core_Controller_Request_Http::getModuleName方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _forward
/**
* Forward current request
*
* @param string $action
* @param string $module
* @param string $controller
* @return void
*/
protected function _forward($action = 'denied', $module = null, $controller = null)
{
if ($this->_request->getActionName() === $action && (null === $module || $this->_request->getModuleName() === $module) && (null === $controller || $this->_request->getControllerName() === $controller)) {
return;
}
$this->_request->initForward();
if ($module) {
$this->_request->setModuleName($module);
}
if ($controller) {
$this->_request->setControllerName($controller);
}
$this->_request->setActionName($action)->setDispatched(false);
}
示例2: _forward
/**
* Forward current request
*
* @param string $action
* @param string $module
* @param string $controller
*/
protected function _forward($action = 'denied', $module = null, $controller = null)
{
$actionName = strtolower($this->_request->getActionName());
// avoid cycling
if ($actionName === $action && (null === $module || $this->_request->getModuleName() === $module) && (null === $controller || $this->_request->getControllerName() === $controller)) {
return;
}
$this->_request->initForward();
if ($module) {
$this->_request->setModuleName($module);
}
if ($controller) {
$this->_request->setControllerName($controller);
}
$this->_request->setActionName($action)->setDispatched(false);
$this->_isForwarded = true;
}
示例3: _initializeFromRequest
/**
* Initialize some useful values from request
*
* @param Mage_Core_Controller_Request_Http $request
* @return this
*/
protected function _initializeFromRequest($request)
{
$this->_moduleName = $request->getModuleName();
$this->_controllerName = $request->getControllerName();
return $this;
}
示例4: getHandler
/**
* Get the empty handles handler for any given request
*
* @param Mage_Core_Controller_Request_Http $request
* @return string
*/
public function getHandler(Mage_Core_Controller_Request_Http $request)
{
$requestParts = array($request->getModuleName(), $request->getControllerName(), $request->getActionName());
return 'emptyhandles/handler_' . implode('_', $requestParts);
}
示例5: isExportRequest
/**
* Return whether request corresponds to an export request from our module for handled grid
*
* @param Mage_Core_Controller_Request_Http $request Request object
* @param string $gridType Grid block type
* @return bool
*/
public function isExportRequest($request, $gridType)
{
$action = $request->getModuleName() . '/' . $request->getControllerName() . '/' . $request->getActionName();
foreach ($this->_getExportTypes($gridType) as $type) {
if ($type['url'] == $action) {
return true;
}
}
return false;
}
示例6: getFullActionName
public function getFullActionName(Mage_Core_Controller_Request_Http $request)
{
return $request->getModuleName() . '_' . $request->getControllerName() . '_' . $request->getActionName();
}
示例7: _matchModuleFrontName
/**
* Match module front name
*
* @param Mage_Core_Controller_Request_Http $request
* @param string $param
* @return string|null
*/
protected function _matchModuleFrontName(Mage_Core_Controller_Request_Http $request, $param)
{
// get module name
if ($request->getModuleName()) {
$moduleFrontName = $request->getModuleName();
} else {
if (!empty($param)) {
$moduleFrontName = $param;
} else {
$moduleFrontName = $this->getFront()->getDefault('module');
$request->setAlias(Mage_Core_Model_Url_Rewrite::REWRITE_REQUEST_PATH_ALIAS, '');
}
}
if (!$moduleFrontName) {
return null;
}
return $moduleFrontName;
}