src/Controller/Component/MobileComponent.php
public function isMobile() {
		if ($this->isMobile !== null) {
			return $this->isMobile;
		}

		$this->isMobile = Configure::read('User.isMobile');
		if ($this->isMobile !== null) {
			return $this->isMobile;
		}
		$this->isMobile = (bool)$this->detect();

		Configure::write('User.isMobile', (int)$this->isMobile);
		return $this->isMobile;
	}
public function isMobile() {
		if ($this->isMobile !== null) {
			return $this->isMobile;
		}

		$this->isMobile = Configure::read('User.isMobile');
		if ($this->isMobile !== null) {
			return $this->isMobile;
		}
		$this->isMobile = (bool)$this->detect();

		Configure::write('User.isMobile', (int)$this->isMobile);
		return $this->isMobile;
	}
public function isMobile ( ) { if ( $ this -> isMobile !== null ) { return $ this -> isMobile ; } $ this -> isMobile = Configure :: read ( 'User.isMobile' ) ; if ( $ this -> isMobile !== null ) { return $ this -> isMobile ; } $ this -> isMobile = ( bool ) $ this -> detect ( ) ; Configure :: write ( 'User.isMobile' , ( int ) $ this -> isMobile ) ; return $ this -> isMobile ; }
Determines if we need to so serve mobile views based on session preference
and browser headers.

@return bool Success
Determines if we need to so serve mobile views based on session preference and browser headers .