/** * <MethodDescription> * * @param type <description> * * @return type <description> */ function is_complex_type($type0) { $type = Studip_Ws_Type::get_type($type0); return $type === STUDIP_WS_TYPE_ARRAY || $type === STUDIP_WS_TYPE_STRUCT; }
/** * <MethodDescription> * * @param mixed <description> * * @return void */ function store_type_recursive(&$type) { $type_class = Studip_Ws_Type::get_type($type); if ($type_class === STUDIP_WS_TYPE_ARRAY) { $element_type =& Studip_Ws_Type::get_element_type($type); $this->store_type($element_type); $this->store_type_recursive($element_type); } else { if ($type_class === STUDIP_WS_TYPE_STRUCT) { $struct =& Studip_Ws_Type::get_element_type($type); foreach (Studip_Ws_Type::get_struct_elements($struct) as $element) { if ($this->store_type($element->type)) { $this->store_type_recursive($element->type); } } } } }
/** * <MethodDescription> * * @param type <description> * * @return type <description> */ function translate_type($type0) { switch ($type = Studip_Ws_Type::get_type($type0)) { case STUDIP_WS_TYPE_INT: return $GLOBALS['xmlrpcInt']; case STUDIP_WS_TYPE_STRING: return $GLOBALS['xmlrpcString']; case STUDIP_WS_TYPE_BASE64: return $GLOBALS['xmlrpcBase64']; case STUDIP_WS_TYPE_BOOL: return $GLOBALS['xmlrpcBoolean']; case STUDIP_WS_TYPE_FLOAT: return $GLOBALS['xmlrpcDouble']; case STUDIP_WS_TYPE_NULL: return $GLOBALS['xmlrpcBoolean']; case STUDIP_WS_TYPE_ARRAY: return $GLOBALS['xmlrpcArray']; case STUDIP_WS_TYPE_STRUCT: return $GLOBALS['xmlrpcStruct']; } trigger_error(sprintf('Type %s could not be found.', var_export($type, TRUE)), E_USER_ERROR); return $GLOBALS['xmlrpcString']; }