protected function canonicalRedirectQueryStringStrategy () {
		/** @var $request \MvcCore\Request */
		$request = & $this->request;
		$redirectToCanonicalUrl = FALSE;
		$requestGlobalGet = & $request->GetGlobalCollection('get');
		$requestedCtrlDc = isset($requestGlobalGet[static::URL_PARAM_CONTROLLER]) ? $requestGlobalGet[static::URL_PARAM_CONTROLLER] : NULL;
		$requestedActionDc = isset($requestGlobalGet[static::URL_PARAM_ACTION]) ? $requestGlobalGet[static::URL_PARAM_ACTION] : NULL;
		$toolClass = self::$toolClass;
		list($dfltCtrlPc, $dftlActionPc) = $this->application->GetDefaultControllerAndActionNames();
		$dfltCtrlDc = $toolClass::GetDashedFromPascalCase($dfltCtrlPc);
		$dftlActionDc = $toolClass::GetDashedFromPascalCase($dftlActionPc);
		$requestedParamsClone = array_merge([], $this->requestedParams);
		if ($requestedCtrlDc !== NULL && $requestedCtrlDc === $dfltCtrlDc) {
			unset($requestedParamsClone[static::URL_PARAM_CONTROLLER]);
			$redirectToCanonicalUrl = TRUE;
		}
		if ($requestedActionDc !== NULL && $requestedActionDc === $dftlActionDc) {
			unset($requestedParamsClone[static::URL_PARAM_ACTION]);
			$redirectToCanonicalUrl = TRUE;
		}
		if ($redirectToCanonicalUrl) {
			$selfCanonicalUrl = $this->UrlByQueryString($this->selfRouteName, $requestedParamsClone);
			$this->redirect($selfCanonicalUrl, \MvcCore\IResponse::MOVED_PERMANENTLY);
			return FALSE;
		}
		return TRUE;
	}
protected function canonicalRedirectQueryStringStrategy () {
		/** @var $request \MvcCore\Request */
		$request = & $this->request;
		$redirectToCanonicalUrl = FALSE;
		$requestGlobalGet = & $request->GetGlobalCollection('get');
		$requestedCtrlDc = isset($requestGlobalGet[static::URL_PARAM_CONTROLLER]) ? $requestGlobalGet[static::URL_PARAM_CONTROLLER] : NULL;
		$requestedActionDc = isset($requestGlobalGet[static::URL_PARAM_ACTION]) ? $requestGlobalGet[static::URL_PARAM_ACTION] : NULL;
		$toolClass = self::$toolClass;
		list($dfltCtrlPc, $dftlActionPc) = $this->application->GetDefaultControllerAndActionNames();
		$dfltCtrlDc = $toolClass::GetDashedFromPascalCase($dfltCtrlPc);
		$dftlActionDc = $toolClass::GetDashedFromPascalCase($dftlActionPc);
		$requestedParamsClone = array_merge([], $this->requestedParams);
		if ($requestedCtrlDc !== NULL && $requestedCtrlDc === $dfltCtrlDc) {
			unset($requestedParamsClone[static::URL_PARAM_CONTROLLER]);
			$redirectToCanonicalUrl = TRUE;
		}
		if ($requestedActionDc !== NULL && $requestedActionDc === $dftlActionDc) {
			unset($requestedParamsClone[static::URL_PARAM_ACTION]);
			$redirectToCanonicalUrl = TRUE;
		}
		if ($redirectToCanonicalUrl) {
			$selfCanonicalUrl = $this->UrlByQueryString($this->selfRouteName, $requestedParamsClone);
			$this->redirect($selfCanonicalUrl, \MvcCore\IResponse::MOVED_PERMANENTLY);
			return FALSE;
		}
		return TRUE;
	}
protected function canonicalRedirectQueryStringStrategy ( ) { /** @var $request \MvcCore\Request */ $ request = & $ this -> request ; $ redirectToCanonicalUrl = FALSE ; $ requestGlobalGet = & $ request -> GetGlobalCollection ( 'get' ) ; $ requestedCtrlDc = isset ( $ requestGlobalGet [ static :: URL_PARAM_CONTROLLER ] ) ? $ requestGlobalGet [ static :: URL_PARAM_CONTROLLER ] : NULL ; $ requestedActionDc = isset ( $ requestGlobalGet [ static :: URL_PARAM_ACTION ] ) ? $ requestGlobalGet [ static :: URL_PARAM_ACTION ] : NULL ; $ toolClass = self :: $ toolClass ; list ( $ dfltCtrlPc , $ dftlActionPc ) = $ this -> application -> GetDefaultControllerAndActionNames ( ) ; $ dfltCtrlDc = $ toolClass :: GetDashedFromPascalCase ( $ dfltCtrlPc ) ; $ dftlActionDc = $ toolClass :: GetDashedFromPascalCase ( $ dftlActionPc ) ; $ requestedParamsClone = array_merge ( [ ] , $ this -> requestedParams ) ; if ( $ requestedCtrlDc !== NULL && $ requestedCtrlDc === $ dfltCtrlDc ) { unset ( $ requestedParamsClone [ static :: URL_PARAM_CONTROLLER ] ) ; $ redirectToCanonicalUrl = TRUE ; } if ( $ requestedActionDc !== NULL && $ requestedActionDc === $ dftlActionDc ) { unset ( $ requestedParamsClone [ static :: URL_PARAM_ACTION ] ) ; $ redirectToCanonicalUrl = TRUE ; } if ( $ redirectToCanonicalUrl ) { $ selfCanonicalUrl = $ this -> UrlByQueryString ( $ this -> selfRouteName , $ requestedParamsClone ) ; $ this -> redirect ( $ selfCanonicalUrl , \ MvcCore \ IResponse :: MOVED_PERMANENTLY ) ; return FALSE ; } return TRUE ; }
If request is routed by query string strategy, check if request controller
or request action is the same as default values. Then redirect to shorter
canonical URL.
@return bool
If request is routed by query string strategy check if request controller or request action is the same as default values . Then redirect to shorter canonical URL .