/** * Clientside processing expects this datastructure back. To make assigns * consistent I elected to defer generating the correct message format * until all the data has been assigned. All the original assignments are * held now in data instead of being the root array. * * @return string */ public function build() { return ViewCompositor::composeJson(array('code' => $this->getStatusCode(), 'message' => $this->getStatusText(), 'data' => $this->getAll())); }