/** * Handles a JSON RPC 2 request to export a bean. * * @param string $id request ID, identification for request * @param string $beanType type of the bean you want to export * @param array $data data array * * @return string */ private function export($id, $beanType, $data) { if (!isset($data[0])) { return $this->resp(NULL, $id, self::C_JSONRPC2_INVALID_PARAMETERS, 'First param needs to be Bean ID'); } $bean = $this->instance->load($beanType, $data[0]); $array = $this->instance->exportAll(array($bean), TRUE); return $this->resp($array, $id); }