protected function _init() {
		parent::_init();

		$mobile = [
			'iPhone', 'MIDP', 'AvantGo', 'BlackBerry', 'J2ME', 'Opera Mini', 'DoCoMo', 'NetFront',
			'Nokia', 'PalmOS', 'PalmSource', 'portalmmm', 'Plucker', 'ReqwirelessWeb', 'iPod',
			'SonyEricsson', 'Symbian', 'UP\.Browser', 'Windows CE', 'Xiino', 'Android'
		];
		if (!empty($this->_config['detectors']['mobile'][1])) {
			$mobile = array_merge($mobile, (array) $this->_config['detectors']['mobile'][1]);
		}
		$this->_detectors['mobile'][1] = $mobile;

		$this->data = (array) $this->_config['data'];

		if (isset($this->data['_method'])) {
			$this->_computed['HTTP_X_HTTP_METHOD_OVERRIDE'] = strtoupper($this->data['_method']);
			unset($this->data['_method']);
		}
		$type = $this->type($this->_config['type'] ?: $this->env('CONTENT_TYPE'));
		$this->method = strtoupper($this->env('REQUEST_METHOD'));
		$hasBody = in_array($this->method, ['POST', 'PUT', 'PATCH']);

		if ($this->_config['drain'] && !$this->body && $hasBody && $type !== 'html') {
			$this->_stream = $this->_stream ?: fopen('php://input', 'r');
			$this->body = stream_get_contents($this->_stream);
			fclose($this->_stream);
		}
		if (!$this->data && $this->body) {
			$this->data = $this->body(null, ['decode' => true, 'encode' => false]);
		}
		$this->body = $this->data;

		if ($this->_config['globals'] && !empty($_FILES)) {
			$this->data = Set::merge($this->data, $this->_parseFiles($_FILES));
		}
	}
protected function _init() {
		parent::_init();

		$mobile = [
			'iPhone', 'MIDP', 'AvantGo', 'BlackBerry', 'J2ME', 'Opera Mini', 'DoCoMo', 'NetFront',
			'Nokia', 'PalmOS', 'PalmSource', 'portalmmm', 'Plucker', 'ReqwirelessWeb', 'iPod',
			'SonyEricsson', 'Symbian', 'UP\.Browser', 'Windows CE', 'Xiino', 'Android'
		];
		if (!empty($this->_config['detectors']['mobile'][1])) {
			$mobile = array_merge($mobile, (array) $this->_config['detectors']['mobile'][1]);
		}
		$this->_detectors['mobile'][1] = $mobile;

		$this->data = (array) $this->_config['data'];

		if (isset($this->data['_method'])) {
			$this->_computed['HTTP_X_HTTP_METHOD_OVERRIDE'] = strtoupper($this->data['_method']);
			unset($this->data['_method']);
		}
		$type = $this->type($this->_config['type'] ?: $this->env('CONTENT_TYPE'));
		$this->method = strtoupper($this->env('REQUEST_METHOD'));
		$hasBody = in_array($this->method, ['POST', 'PUT', 'PATCH']);

		if ($this->_config['drain'] && !$this->body && $hasBody && $type !== 'html') {
			$this->_stream = $this->_stream ?: fopen('php://input', 'r');
			$this->body = stream_get_contents($this->_stream);
			fclose($this->_stream);
		}
		if (!$this->data && $this->body) {
			$this->data = $this->body(null, ['decode' => true, 'encode' => false]);
		}
		$this->body = $this->data;

		if ($this->_config['globals'] && !empty($_FILES)) {
			$this->data = Set::merge($this->data, $this->_parseFiles($_FILES));
		}
	}
protected function _init ( ) { parent :: _init ( ) ; $ mobile = [ 'iPhone' , 'MIDP' , 'AvantGo' , 'BlackBerry' , 'J2ME' , 'Opera Mini' , 'DoCoMo' , 'NetFront' , 'Nokia' , 'PalmOS' , 'PalmSource' , 'portalmmm' , 'Plucker' , 'ReqwirelessWeb' , 'iPod' , 'SonyEricsson' , 'Symbian' , 'UP\.Browser' , 'Windows CE' , 'Xiino' , 'Android' ] ; if ( ! empty ( $ this -> _config [ 'detectors' ] [ 'mobile' ] [ 1 ] ) ) { $ mobile = array_merge ( $ mobile , ( array ) $ this -> _config [ 'detectors' ] [ 'mobile' ] [ 1 ] ) ; } $ this -> _detectors [ 'mobile' ] [ 1 ] = $ mobile ; $ this -> data = ( array ) $ this -> _config [ 'data' ] ; if ( isset ( $ this -> data [ '_method' ] ) ) { $ this -> _computed [ 'HTTP_X_HTTP_METHOD_OVERRIDE' ] = strtoupper ( $ this -> data [ '_method' ] ) ; unset ( $ this -> data [ '_method' ] ) ; } $ type = $ this -> type ( $ this -> _config [ 'type' ] ? : $ this -> env ( 'CONTENT_TYPE' ) ) ; $ this -> method = strtoupper ( $ this -> env ( 'REQUEST_METHOD' ) ) ; $ hasBody = in_array ( $ this -> method , [ 'POST' , 'PUT' , 'PATCH' ] ) ; if ( $ this -> _config [ 'drain' ] && ! $ this -> body && $ hasBody && $ type !== 'html' ) { $ this -> _stream = $ this -> _stream ? : fopen ( 'php://input' , 'r' ) ; $ this -> body = stream_get_contents ( $ this -> _stream ) ; fclose ( $ this -> _stream ) ; } if ( ! $ this -> data && $ this -> body ) { $ this -> data = $ this -> body ( null , [ 'decode' => true , 'encode' => false ] ) ; } $ this -> body = $ this -> data ; if ( $ this -> _config [ 'globals' ] && ! empty ( $ _FILES ) ) { $ this -> data = Set :: merge ( $ this -> data , $ this -> _parseFiles ( $ _FILES ) ) ; } }
Initializes request object by setting up mobile detectors, determining method and
populating the data property either by using i.e. form data or reading from STDIN in
case binary data is streamed. Will merge any files posted in forms with parsed data.

Note that only beginning with PHP 5.6 STDIN can be opened/read and closed more than once.

@see lithium\action\Request::_parseFiles()
Initializes request object by setting up mobile detectors determining method and populating the data property either by using i . e . form data or reading from STDIN in case binary data is streamed . Will merge any files posted in forms with parsed data .