fuel/fuel/core/classes/session/driver.php
protected function _get_cookie()
	 {
		// was the cookie value posted?
		$cookie = \Input::post($this->config['post_cookie_name'], false);

		// if not found, fetch the regular cookie
		if ($cookie === false)
		{
			$cookie = \Cookie::get($this->config['cookie_name'], false);
		}

		// if not found, was a session-id present in the HTTP header?
		if ($cookie === false)
		{
			$cookie = \Input::headers($this->config['http_header_name'], false);
		}

		// if not found, check the URL for a cookie
		if ($cookie === false)
		{
			$cookie = \Input::get($this->config['cookie_name'], false);
		}

		if ($cookie !== false)
		{
			// fetch the payload
			$this->config['encrypt_cookie'] and $cookie = \Crypt::decode($cookie);
			$cookie = $this->_unserialize($cookie);

			// validate the cookie format: must be an array
			if (is_array($cookie))
			{
				// cookies use nested arrays, other drivers have a string value
				if (($this->config['driver'] === 'cookie' and ! is_array($cookie[0])) or
					($this->config['driver'] !== 'cookie' and ! is_string($cookie[0])))
				{
					// invalid specific format
					logger('DEBUG', 'Error: Invalid session cookie specific format');
					$cookie = false;
				}
			}

			// or a string containing the session id
			elseif (is_string($cookie) and strlen($cookie) == 32)
			{
				$cookie = array($cookie);
			}

			// invalid general format
			else
			{
				logger('DEBUG', 'Error: Invalid session cookie general format');
				$cookie = false;
			}
		}

		// and the result
		return $cookie;
	 }
protected function _get_cookie()
	 {
		// was the cookie value posted?
		$cookie = \Input::post($this->config['post_cookie_name'], false);

		// if not found, fetch the regular cookie
		if ($cookie === false)
		{
			$cookie = \Cookie::get($this->config['cookie_name'], false);
		}

		// if not found, was a session-id present in the HTTP header?
		if ($cookie === false)
		{
			$cookie = \Input::headers($this->config['http_header_name'], false);
		}

		// if not found, check the URL for a cookie
		if ($cookie === false)
		{
			$cookie = \Input::get($this->config['cookie_name'], false);
		}

		if ($cookie !== false)
		{
			// fetch the payload
			$this->config['encrypt_cookie'] and $cookie = \Crypt::decode($cookie);
			$cookie = $this->_unserialize($cookie);

			// validate the cookie format: must be an array
			if (is_array($cookie))
			{
				// cookies use nested arrays, other drivers have a string value
				if (($this->config['driver'] === 'cookie' and ! is_array($cookie[0])) or
					($this->config['driver'] !== 'cookie' and ! is_string($cookie[0])))
				{
					// invalid specific format
					logger('DEBUG', 'Error: Invalid session cookie specific format');
					$cookie = false;
				}
			}

			// or a string containing the session id
			elseif (is_string($cookie) and strlen($cookie) == 32)
			{
				$cookie = array($cookie);
			}

			// invalid general format
			else
			{
				logger('DEBUG', 'Error: Invalid session cookie general format');
				$cookie = false;
			}
		}

		// and the result
		return $cookie;
	 }
protected function _get_cookie ( ) { // was the cookie value posted? $ cookie = \ Input :: post ( $ this -> config [ 'post_cookie_name' ] , false ) ; // if not found, fetch the regular cookie if ( $ cookie === false ) { $ cookie = \ Cookie :: get ( $ this -> config [ 'cookie_name' ] , false ) ; } // if not found, was a session-id present in the HTTP header? if ( $ cookie === false ) { $ cookie = \ Input :: headers ( $ this -> config [ 'http_header_name' ] , false ) ; } // if not found, check the URL for a cookie if ( $ cookie === false ) { $ cookie = \ Input :: get ( $ this -> config [ 'cookie_name' ] , false ) ; } if ( $ cookie !== false ) { // fetch the payload $ this -> config [ 'encrypt_cookie' ] and $ cookie = \ Crypt :: decode ( $ cookie ) ; $ cookie = $ this -> _unserialize ( $ cookie ) ; // validate the cookie format: must be an array if ( is_array ( $ cookie ) ) { // cookies use nested arrays, other drivers have a string value if ( ( $ this -> config [ 'driver' ] === 'cookie' and ! is_array ( $ cookie [ 0 ] ) ) or ( $ this -> config [ 'driver' ] !== 'cookie' and ! is_string ( $ cookie [ 0 ] ) ) ) { // invalid specific format logger ( 'DEBUG' , 'Error: Invalid session cookie specific format' ) ; $ cookie = false ; } } // or a string containing the session id elseif ( is_string ( $ cookie ) and strlen ( $ cookie ) == 32 ) { $ cookie = array ( $ cookie ) ; } // invalid general format else { logger ( 'DEBUG' , 'Error: Invalid session cookie general format' ) ; $ cookie = false ; } } // and the result return $ cookie ; }
read a cookie

@access	private
@return  void
read a cookie