lithium\data\source\http\adapter\CouchDb::_format()

protected method

Formats a CouchDb result set into a standard result to be passed to item.

Parameters

  • array $data

    data returned from query

Returns

array

Source

	protected function _format(array $data) {
		foreach (['id', 'rev'] as $key) {
			if (isset($data["_{$key}"])) {
				$data[$key] = $data["_{$key}"];
				unset($data["_{$key}"]);
			}
		}
		return $data;
	}