protected function manageMediaDetectionAndStoreInSession() {
		$detect = new \Mobile_Detect();
		if (
			array_key_exists(Routers\IMedia::MEDIA_VERSION_MOBILE, $this->allowedMediaVersionsAndUrlValues) && 
			$detect->isMobile()
		) {
			$this->mediaSiteVersion = Routers\IMedia::MEDIA_VERSION_MOBILE;
		} else if (
			array_key_exists(Routers\IMedia::MEDIA_VERSION_TABLET, $this->allowedMediaVersionsAndUrlValues) && 
			$detect->isTablet()
		) {
			$this->mediaSiteVersion = Routers\IMedia::MEDIA_VERSION_TABLET;
		} else {
			$this->mediaSiteVersion = Routers\IMedia::MEDIA_VERSION_FULL;
		}
		$mediaVersionUrlParam = static::URL_PARAM_MEDIA_VERSION;
		$this->session->{$mediaVersionUrlParam} = $this->mediaSiteVersion;
		$this->firstRequestMediaDetection = $this->mediaSiteVersion === $this->requestMediaSiteVersion;
	}
protected function manageMediaDetectionAndStoreInSession() {
		$detect = new \Mobile_Detect();
		if (
			array_key_exists(Routers\IMedia::MEDIA_VERSION_MOBILE, $this->allowedMediaVersionsAndUrlValues) && 
			$detect->isMobile()
		) {
			$this->mediaSiteVersion = Routers\IMedia::MEDIA_VERSION_MOBILE;
		} else if (
			array_key_exists(Routers\IMedia::MEDIA_VERSION_TABLET, $this->allowedMediaVersionsAndUrlValues) && 
			$detect->isTablet()
		) {
			$this->mediaSiteVersion = Routers\IMedia::MEDIA_VERSION_TABLET;
		} else {
			$this->mediaSiteVersion = Routers\IMedia::MEDIA_VERSION_FULL;
		}
		$mediaVersionUrlParam = static::URL_PARAM_MEDIA_VERSION;
		$this->session->{$mediaVersionUrlParam} = $this->mediaSiteVersion;
		$this->firstRequestMediaDetection = $this->mediaSiteVersion === $this->requestMediaSiteVersion;
	}
protected function manageMediaDetectionAndStoreInSession ( ) { $ detect = new \ Mobile_Detect ( ) ; if ( array_key_exists ( Routers \ IMedia :: MEDIA_VERSION_MOBILE , $ this -> allowedMediaVersionsAndUrlValues ) && $ detect -> isMobile ( ) ) { $ this -> mediaSiteVersion = Routers \ IMedia :: MEDIA_VERSION_MOBILE ; } else if ( array_key_exists ( Routers \ IMedia :: MEDIA_VERSION_TABLET , $ this -> allowedMediaVersionsAndUrlValues ) && $ detect -> isTablet ( ) ) { $ this -> mediaSiteVersion = Routers \ IMedia :: MEDIA_VERSION_TABLET ; } else { $ this -> mediaSiteVersion = Routers \ IMedia :: MEDIA_VERSION_FULL ; } $ mediaVersionUrlParam = static :: URL_PARAM_MEDIA_VERSION ; $ this -> session -> { $ mediaVersionUrlParam } = $ this -> mediaSiteVersion ; $ this -> firstRequestMediaDetection = $ this -> mediaSiteVersion === $ this -> requestMediaSiteVersion ; }
Detect media site version by sent user agent string by
third party `\Mobile_Detect` library and store detected result
in session namespace for next requests.
@return void
Detect media site version by sent user agent string by third party \ Mobile_Detect library and store detected result in session namespace for next requests .