/** * Returns "basecategories", e.g. Games, Multimedia * These are not the package categoiries, but the categories * MeeGo Apps defined. They are mapped to real package categories anyway. * * @param array HTTP GET args */ public function get_categories(array $args) { $q = new midgard_query_select(new midgard_query_storage('com_meego_package_basecategory')); $q->add_order(new midgard_query_property('name'), SORT_ASC); $q->execute(); $allcategories = $q->list_objects(); $ocs = new com_meego_ocs_OCSWriter(); $ocs->writeMeta(count($allcategories), $this->pagesize); $ocs->writeCategories($allcategories); $ocs->endDocument(); self::output_xml($ocs); }