protected function build() { $q = new LimeTypesQuery(); if ($q->select()) { $types = new LimeTypesXML($q); return $types; } return '<response status="error" message="No defined types" />'; }
protected function build() { $q = new LimeTypesQuery(); if ($q->select()) { $types = new LimeTypesJSON(); while ($type = $q->hash()) { $types->append(array("id" => $type['id'], "type" => $type['type'], "label" => $type['label'])); } return $types; } return array("response" => "error", "message" => "No defined types"); }