public function getDumpJson($r) { $item_json = new Dase_DBO_ItemJson($this->db); $item_json->addWhere('unique_id', $this->collection->ascii_id . '/%', 'like'); $docs = array(); foreach ($item_json->find() as $ij) { $ij = clone $ij; $doc = str_replace('{APP_ROOT}', $r->app_root, $ij->doc); $docs[] = $doc; } $coll_url = $this->collection->getUrl($r->app_root); $updated = $this->collection->updated; $name = $this->collection->collection_name; $json = "{\"id\":\"{$coll_url}\",\"collection_name\":\"{$name}\",\"updated\":\"{$updated}\",\"items\":["; $json .= join(',', $docs) . ']}'; $r->renderResponse($json); }