private function _mapbox (array $parts)
	{
		$parts = array_reduce(
			$parts,
			function ($a, $part) {
				$key = explode('.', $part['id'])[0];
				$a[$key] = $part['text'];

				return $a;
			},
			[
				'number' => $parts['address'],
				$parts['place_type'][0] => $parts['text'],
			]
		);

		$this->number   = $parts['number'];
		$this->address  = $parts['address'];
		$this->city     = $parts['city'];
		$this->postcode = $parts['postcode'];
		$this->county   = $parts['county'];
		$this->state    = $parts['state'];
		$this->country  = $parts['country'];
	}
private function _mapbox (array $parts)
	{
		$parts = array_reduce(
			$parts,
			function ($a, $part) {
				$key = explode('.', $part['id'])[0];
				$a[$key] = $part['text'];

				return $a;
			},
			[
				'number' => $parts['address'],
				$parts['place_type'][0] => $parts['text'],
			]
		);

		$this->number   = $parts['number'];
		$this->address  = $parts['address'];
		$this->city     = $parts['city'];
		$this->postcode = $parts['postcode'];
		$this->county   = $parts['county'];
		$this->state    = $parts['state'];
		$this->country  = $parts['country'];
	}
private function _mapbox ( array $ parts ) { $ parts = array_reduce ( $ parts , function ( $ a , $ part ) { $ key = explode ( '.' , $ part [ 'id' ] ) [ 0 ] ; $ a [ $ key ] = $ part [ 'text' ] ; return $ a ; } , [ 'number' => $ parts [ 'address' ] , $ parts [ 'place_type' ] [ 0 ] => $ parts [ 'text' ] , ] ) ; $ this -> number = $ parts [ 'number' ] ; $ this -> address = $ parts [ 'address' ] ; $ this -> city = $ parts [ 'city' ] ; $ this -> postcode = $ parts [ 'postcode' ] ; $ this -> county = $ parts [ 'county' ] ; $ this -> state = $ parts [ 'state' ] ; $ this -> country = $ parts [ 'country' ] ; }
Parse Mapbox parts

@param array $parts
Parse Mapbox parts