public function to($type) {
		if ($type === 'array') {
			$result = [];

			foreach (['status', 'message', 'data', 'code'] as $field) {
				if ($this->{"_{$field}"} !== null || $field === 'data') {
					$result[$field] = $this->{"_{$field}"};
				}
			}
			return $result;
		}
		throw new Exception("Cannot convert to type `{$type}`.");
	}