src/MvcCore/Ext/Routers/Module/DomainRouting.php
protected function domainRouting () {
		$request = & $this->request;
		if ($this->routeGetRequestsOnly) {
			$selfClass = version_compare(PHP_VERSION, '5.5', '>') ? self::class : __CLASS__;
			trigger_error("[".$selfClass."] Routing only GET requests with special media "
			."site version or localization conditions is not allowed in module router.", 
			E_USER_WARNING);
			$this->routeGetRequestsOnly = FALSE;
		}
		/** @var $route \MvcCore\Ext\Routers\Modules\Route */
		$allMatchedParams = [];
		foreach ($this->domainRoutes as & $route) {
			$allMatchedParams = $route->Matches($request);
			if ($allMatchedParams !== NULL) {
				$this->currentDomainRoute = clone $route;
				$this->currentModule = $this->currentDomainRoute->GetModule();
				$this->currentDomainRoute->SetMatchedParams($allMatchedParams);
				$this->domainRoutingSetRequestedAndDefaultParams($allMatchedParams);
				$break = $this->domainRoutingFilterParams($allMatchedParams);
				$this->domainRoutingSetUpRouterByDomainRoute();
				if ($break) break;
			}
		}
	}
protected function domainRouting () {
		$request = & $this->request;
		if ($this->routeGetRequestsOnly) {
			$selfClass = version_compare(PHP_VERSION, '5.5', '>') ? self::class : __CLASS__;
			trigger_error("[".$selfClass."] Routing only GET requests with special media "
			."site version or localization conditions is not allowed in module router.", 
			E_USER_WARNING);
			$this->routeGetRequestsOnly = FALSE;
		}
		/** @var $route \MvcCore\Ext\Routers\Modules\Route */
		$allMatchedParams = [];
		foreach ($this->domainRoutes as & $route) {
			$allMatchedParams = $route->Matches($request);
			if ($allMatchedParams !== NULL) {
				$this->currentDomainRoute = clone $route;
				$this->currentModule = $this->currentDomainRoute->GetModule();
				$this->currentDomainRoute->SetMatchedParams($allMatchedParams);
				$this->domainRoutingSetRequestedAndDefaultParams($allMatchedParams);
				$break = $this->domainRoutingFilterParams($allMatchedParams);
				$this->domainRoutingSetUpRouterByDomainRoute();
				if ($break) break;
			}
		}
	}
protected function domainRouting ( ) { $ request = & $ this -> request ; if ( $ this -> routeGetRequestsOnly ) { $ selfClass = version_compare ( PHP_VERSION , '5.5' , '>' ) ? self :: class : __CLASS__ ; trigger_error ( "[" . $ selfClass . "] Routing only GET requests with special media " . "site version or localization conditions is not allowed in module router." , E_USER_WARNING ) ; $ this -> routeGetRequestsOnly = FALSE ; } /** @var $route \MvcCore\Ext\Routers\Modules\Route */ $ allMatchedParams = [ ] ; foreach ( $ this -> domainRoutes as & $ route ) { $ allMatchedParams = $ route -> Matches ( $ request ) ; if ( $ allMatchedParams !== NULL ) { $ this -> currentDomainRoute = clone $ route ; $ this -> currentModule = $ this -> currentDomainRoute -> GetModule ( ) ; $ this -> currentDomainRoute -> SetMatchedParams ( $ allMatchedParams ) ; $ this -> domainRoutingSetRequestedAndDefaultParams ( $ allMatchedParams ) ; $ break = $ this -> domainRoutingFilterParams ( $ allMatchedParams ) ; $ this -> domainRoutingSetUpRouterByDomainRoute ( ) ; if ( $ break ) break ; } } }
Process routing by defined module domain routes. If any module domain
route matches the request, complete current domain route property and
current domain module property and set up requested domain params and
default domain params by matched domain route params.
@throws \LogicException Route configuration property is missing.
@throws \InvalidArgumentException Wrong route pattern format.
@return void
Process routing by defined module domain routes . If any module domain route matches the request complete current domain route property and current domain module property and set up requested domain params and default domain params by matched domain route params .