protected function get_phpdoc_type($keydesc) {
        $type = null;
        if ($keydesc instanceof external_value) {
            switch ($keydesc->type) {
                case PARAM_BOOL: // 0 or 1 only for now.
                case PARAM_INT:
                    $type = 'int';
                    break;
                case PARAM_FLOAT;
                    $type = 'double';
                    break;
                default:
                    $type = 'string';
            }
        } else if ($keydesc instanceof external_single_structure) {
            $type = $this->generate_simple_struct_class($keydesc);
        } else if ($keydesc instanceof external_multiple_structure) {
            $type = 'array';
        }

        return $type;
    }
protected function get_phpdoc_type($keydesc) {
        $type = null;
        if ($keydesc instanceof external_value) {
            switch ($keydesc->type) {
                case PARAM_BOOL: // 0 or 1 only for now.
                case PARAM_INT:
                    $type = 'int';
                    break;
                case PARAM_FLOAT;
                    $type = 'double';
                    break;
                default:
                    $type = 'string';
            }
        } else if ($keydesc instanceof external_single_structure) {
            $type = $this->generate_simple_struct_class($keydesc);
        } else if ($keydesc instanceof external_multiple_structure) {
            $type = 'array';
        }

        return $type;
    }
protected function get_phpdoc_type ( $ keydesc ) { $ type = null ; if ( $ keydesc instanceof external_value ) { switch ( $ keydesc -> type ) { case PARAM_BOOL : // 0 or 1 only for now. case PARAM_INT : $ type = 'int' ; break ; case PARAM_FLOAT ; $ type = 'double' ; break ; default : $ type = 'string' ; } } else if ( $ keydesc instanceof external_single_structure ) { $ type = $ this -> generate_simple_struct_class ( $ keydesc ) ; } else if ( $ keydesc instanceof external_multiple_structure ) { $ type = 'array' ; } return $ type ; }
Get the phpdoc type for an external_description object.
external_value => int, double or string
external_single_structure => object|struct, on-fly generated stdClass name.
external_multiple_structure => array

@param mixed $keydesc The type description.
@return string The PHP doc type of the external_description object.
Get the phpdoc type for an external_description object . external_value = > int double or string external_single_structure = > object|struct on - fly generated stdClass name . external_multiple_structure = > array