cphalcon icon indicating copy to clipboard operation
cphalcon copied to clipboard

[NFR] Default values of method parameters in documentation

Open glagola opened this issue 13 years ago • 18 comments

It would be great to see default values of method parameters in documentation, instead of searching them in source code.

glagola avatar Jun 01 '13 13:06 glagola

+1. Spent very huge amount of time on this.

alvassin avatar Jun 02 '13 11:06 alvassin

I can offer such an option old: http://docs.phalconphp.com/en/latest/api/Phalcon_Cache_Backend_File.html old

new: http://docs.phalconphp.ru/ru/latest/api/Phalcon_Cache_Backend_File.html new

xboston avatar Jun 02 '13 18:06 xboston

Are you sure that all default values are NULL? or it is just an example?

glagola avatar Jun 02 '13 18:06 glagola

I used the method getDefaultValue in Reflection, tihs real example. Tell me which class is not null default, test it =)

xboston avatar Jun 02 '13 18:06 xboston

Reflection does not work with classes/interfaces/function ... from extensions (read warnings). I have test this fact today, before create this issue.

glagola avatar Jun 02 '13 18:06 glagola

Ooops =(

xboston avatar Jun 02 '13 18:06 xboston

Tell me which class is not null default, i want to solve this problem

xboston avatar Jun 02 '13 19:06 xboston

I don't now such classes, but I think that some bool params could have true by default.

glagola avatar Jun 02 '13 19:06 glagola

found:

    if (!stop_buffer) {
        PHALCON_INIT_VAR(stop_buffer);
        ZVAL_BOOL(stop_buffer, 1);
    }

Search and completion of such values ​​will require a lot of time. Maybe put the problem in NFR?

xboston avatar Jun 02 '13 20:06 xboston

Added NFR to the issue title

glagola avatar Jun 02 '13 20:06 glagola

+1

xboston avatar Jun 02 '13 20:06 xboston

+1

jeffreycahyono avatar Jun 03 '13 13:06 jeffreycahyono

+1

igorgolovanov avatar Jun 04 '13 10:06 igorgolovanov

+100500 It definitely should be specified in the source code docs

iforp avatar Jun 04 '13 11:06 iforp

Moreover, we are now discussing with @xboston the multilingual application for convenient display of API docs, so this information is necessary.

iforp avatar Jun 04 '13 11:06 iforp

Please post this NFR in the docs repository: https://github.com/phalcon/docs, this can't be implemented in the extension itself, thanks

ghost avatar Jun 05 '13 19:06 ghost

Ok, done https://github.com/phalcon/docs/issues/104

glagola avatar Jun 05 '13 19:06 glagola

@glagola thanks

ghost avatar Jun 05 '13 19:06 ghost