protected function populateGlobals(string $method)
	{
		if (! isset($this->globals[$method]))
		{
			$this->globals[$method] = [];
		}

		// Don't populate ENV as it might contain
		// sensitive data that we don't want to get logged.
		switch($method)
		{
			case 'get':
				$this->globals['get'] = $_GET;
				break;
			case 'post':
				$this->globals['post'] = $_POST;
				break;
			case 'request':
				$this->globals['request'] = $_REQUEST;
				break;
			case 'cookie':
				$this->globals['cookie'] = $_COOKIE;
				break;
			case 'server':
				$this->globals['server'] = $_SERVER;
				break;
		}
	}
protected function populateGlobals(string $method)
	{
		if (! isset($this->globals[$method]))
		{
			$this->globals[$method] = [];
		}

		// Don't populate ENV as it might contain
		// sensitive data that we don't want to get logged.
		switch($method)
		{
			case 'get':
				$this->globals['get'] = $_GET;
				break;
			case 'post':
				$this->globals['post'] = $_POST;
				break;
			case 'request':
				$this->globals['request'] = $_REQUEST;
				break;
			case 'cookie':
				$this->globals['cookie'] = $_COOKIE;
				break;
			case 'server':
				$this->globals['server'] = $_SERVER;
				break;
		}
	}
protected function populateGlobals ( string $ method ) { if ( ! isset ( $ this -> globals [ $ method ] ) ) { $ this -> globals [ $ method ] = [ ] ; } // Don't populate ENV as it might contain // sensitive data that we don't want to get logged. switch ( $ method ) { case 'get' : $ this -> globals [ 'get' ] = $ _GET ; break ; case 'post' : $ this -> globals [ 'post' ] = $ _POST ; break ; case 'request' : $ this -> globals [ 'request' ] = $ _REQUEST ; break ; case 'cookie' : $ this -> globals [ 'cookie' ] = $ _COOKIE ; break ; case 'server' : $ this -> globals [ 'server' ] = $ _SERVER ; break ; } }
Saves a copy of the current state of one of several PHP globals
so we can retrieve them later.

@param string $method
Saves a copy of the current state of one of several PHP globals so we can retrieve them later .