|
2836 | 2836 | objClassName : abs.className, |
2837 | 2837 | phpDocOutput : abs.cfgFlags & this.valDumper.objectDumper.PHPDOC_OUTPUT, |
2838 | 2838 | }, cfg); |
| 2839 | + delete abs[what].__debug_key_order__; |
2839 | 2840 | if (cfg.groupByInheritance === false) { |
2840 | 2841 | return this.dumpItemsFiltered(abs[what], cfg) |
2841 | 2842 | } |
|
2931 | 2932 |
|
2932 | 2933 | Cases.prototype.dump = function (abs) { |
2933 | 2934 | var cfg = { |
2934 | | - attributeOutput : abs.cfgFlags & this.CASE_ATTRIBUTE_OUTPUT, |
2935 | | - collect : abs.cfgFlags & this.CASE_COLLECT, |
| 2935 | + attributeOutput : abs.cfgFlags & this.valDumper.objectDumper.CASE_ATTRIBUTE_OUTPUT, |
| 2936 | + collect : abs.cfgFlags & this.valDumper.objectDumper.CASE_COLLECT, |
2936 | 2937 | groupByInheritance : false, |
2937 | | - output : abs.cfgFlags & this.CASE_OUTPUT, |
2938 | | - phpDocOutput : abs.cfgFlags & this.PHPDOC_OUTPUT, |
| 2938 | + output : abs.cfgFlags & this.valDumper.objectDumper.CASE_OUTPUT, |
| 2939 | + phpDocOutput : abs.cfgFlags & this.valDumper.objectDumper.PHPDOC_OUTPUT, |
2939 | 2940 | }; |
2940 | 2941 | if (abs.implementsList.indexOf('UnitEnum') < 0) { |
2941 | 2942 | return '' |
|
2946 | 2947 | if (!cfg.collect) { |
2947 | 2948 | return '<dt class="cases">cases <i>not collected</i></dt>' |
2948 | 2949 | } |
2949 | | - if (abs.cases.length === 0) { |
| 2950 | + if (Object.keys(abs.cases).length < 1) { |
2950 | 2951 | return '<dt class="cases"><i>no cases!</i></dt>' |
2951 | 2952 | } |
2952 | 2953 | return '<dt class="cases">cases</dt>' + |
|
2958 | 2959 | ? info.desc |
2959 | 2960 | : null; |
2960 | 2961 | var $element = $$1('<div></div>') |
2961 | | - .html('<span class="t_identifier">' + key + '</span>' + |
2962 | | - (info.value !== null |
| 2962 | + .html('<span class="t_identifier">' + name + '</span>' + |
| 2963 | + (info.value !== this.valDumper.UNDEFINED |
2963 | 2964 | ? ' <span class="t_operator">=</span> ' + |
2964 | | - self.dumper.dump(info.value) |
| 2965 | + this.valDumper.dump(info.value) |
2965 | 2966 | : '' |
2966 | 2967 | ) |
2967 | 2968 | ); |
|
3011 | 3012 | if (!cfg.collect) { |
3012 | 3013 | return '<dt class="constants">constants <i>not collected</i></dt>' |
3013 | 3014 | } |
3014 | | - if (!abs.constants.length) { |
| 3015 | + if (Object.keys(abs.constants).length < 1) { |
3015 | 3016 | return '' |
3016 | 3017 | } |
3017 | 3018 | return '<dt class="constants">constants</dt>' + |
|
3073 | 3074 | if (info.phpDoc && info.phpDoc.deprecated) { |
3074 | 3075 | $element.attr('data-deprecated-desc', info.phpDoc.deprecated[0].desc); |
3075 | 3076 | } |
| 3077 | + if (cfg.phpDocOutput && info.phpDoc && info.phpDoc.throws) { |
| 3078 | + $element.attr('data-throws', JSON.stringify(info.phpDoc.throws)); |
| 3079 | + } |
3076 | 3080 | }; |
3077 | 3081 |
|
3078 | 3082 | Methods.prototype.dump = function (abs) { |
|
3134 | 3138 | }; |
3135 | 3139 |
|
3136 | 3140 | Methods.prototype.dumpName = function (name, info, cfg) { |
3137 | | - var title = cfg.phpDocOutput |
3138 | | - ? (info.phpDoc.summary + |
3139 | | - (cfg.methodDescOutput |
3140 | | - ? "\n\n" + info.phpDoc.desc |
3141 | | - : '' |
3142 | | - )).trim() |
3143 | | - : ''; |
| 3141 | + var titleParts = [ |
| 3142 | + info.phpDoc.summary || '', |
| 3143 | + cfg.methodDescOutput |
| 3144 | + ? info.phpDoc.desc || '' |
| 3145 | + : '', |
| 3146 | + ]; |
| 3147 | + var title = titleParts.join("\n\n").trim(); |
3144 | 3148 | return ' <span class="t_identifier"' + |
3145 | | - (title !== '' |
| 3149 | + (cfg.phpDocOutput && title !== '' |
3146 | 3150 | ? ' title="' + title.escapeHtml() + '"' |
3147 | 3151 | : '' |
3148 | 3152 | ) + |
|
3215 | 3219 | Methods.prototype.dumpStaticVars = function (info, cfg) { |
3216 | 3220 | var self = this; |
3217 | 3221 | var html = ''; |
3218 | | - if (!cfg.staticVarOutput || info.staticVars.length < 0) { |
| 3222 | + if (!cfg.staticVarOutput || info.staticVars.length < 1) { |
3219 | 3223 | return '' |
3220 | 3224 | } |
3221 | 3225 | html = '<h3>static variables</h3>'; |
|
3444 | 3448 |
|
3445 | 3449 | DumpObject.prototype.dump = function (abs) { |
3446 | 3450 | // console.info('dumpObject', abs) |
3447 | | - var classDefinition; |
3448 | 3451 | var html = ''; |
3449 | | - var i = 0; |
3450 | | - var count; |
3451 | 3452 | var strClassname = ''; |
3452 | | - var noInherit = ['attributes', 'cases', 'constants', 'methods', 'properties']; |
3453 | 3453 | var dumpOpts = this.dumper.getDumpOpts(); |
3454 | 3454 | try { |
3455 | | - classDefinition = this.dumper.getClassDefinition(abs.classDefinition); |
3456 | | - if (abs.isRecursion || abs.isExcluded) { |
3457 | | - for (i = 0; i < noInherit.length; i++) { |
3458 | | - classDefinition[noInherit[i]] = {}; |
3459 | | - } |
3460 | | - } |
3461 | | - abs = JSON.parse(JSON.stringify(mergeWith_1({}, classDefinition, abs, function (objValue, srcValue) { |
3462 | | - if (objValue === null || srcValue === null) { |
3463 | | - return |
3464 | | - } |
3465 | | - if (typeof srcValue === 'object' && typeof objValue === 'object' && Object.keys(objValue).length === 0) { |
3466 | | - return srcValue |
3467 | | - } |
3468 | | - }))); |
3469 | | - for (i = 0, count = noInherit.length; i < count; i++) { |
3470 | | - if (Object.keys(abs[noInherit[i]]).length < 2) { |
3471 | | - continue |
3472 | | - } |
3473 | | - abs[noInherit[i]] = sort(abs[noInherit[i]], abs.sort); |
3474 | | - } |
| 3455 | + abs = this.mergeInherited(abs); |
3475 | 3456 | if (typeof abs.cfgFlags === 'undefined') { |
3476 | 3457 | abs.cfgFlags = 0x1FFFFFF & ~this.BRIEF; |
3477 | 3458 | } |
|
3776 | 3757 | return '<span class="t_type">' + type + '</span>' |
3777 | 3758 | }; |
3778 | 3759 |
|
| 3760 | + DumpObject.prototype.mergeInherited = function (abs) { |
| 3761 | + var count; |
| 3762 | + var i = 0; |
| 3763 | + var inherited; |
| 3764 | + var noInherit = ['attributes', 'cases', 'constants', 'methods', 'properties']; |
| 3765 | + while (abs.inheritsFrom) { |
| 3766 | + inherited = this.dumper.getClassDefinition(abs.inheritsFrom); |
| 3767 | + if (abs.isRecursion || abs.isExcluded) { |
| 3768 | + for (i = 0, count = noInherit.length; i < count; i++) { |
| 3769 | + inherited[noInherit[i]] = {}; |
| 3770 | + } |
| 3771 | + } |
| 3772 | + abs = JSON.parse(JSON.stringify(mergeWith_1({}, inherited, abs, function (objValue, srcValue) { |
| 3773 | + if (objValue === null || srcValue === null) { |
| 3774 | + return |
| 3775 | + } |
| 3776 | + if (typeof srcValue === 'object' && typeof objValue === 'object' && Object.keys(objValue).length === 0) { |
| 3777 | + return srcValue |
| 3778 | + } |
| 3779 | + }))); |
| 3780 | + abs.inheritsFrom = inherited.inheritsFrom; |
| 3781 | + } |
| 3782 | + for (i = 0, count = noInherit.length; i < count; i++) { |
| 3783 | + if (Object.keys(abs[noInherit[i]]).length < 2) { |
| 3784 | + continue |
| 3785 | + } |
| 3786 | + abs[noInherit[i]] = sort(abs[noInherit[i]], abs.sort); |
| 3787 | + } |
| 3788 | + return abs |
| 3789 | + }; |
| 3790 | + |
3779 | 3791 | var base64Arraybuffer = createCommonjsModule(function (module, exports) { |
3780 | 3792 | /* |
3781 | 3793 | * base64-arraybuffer |
|
0 commit comments