OO docs 1
| From: | Andr� L F S Bacci | Date: | Sat, 03 Jan 2004 16:51:48 +0000 |
| Subject: | OO docs 1 | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969357882@lists.php.net to get a copy of this message | ||
Steph wrote:
>>> Which the great problem with OO after all? Render, search,
>>> filenames?
>>> http://www.docbook.org/tdg/en/html/classsynopsis.html
>>
>> That classsynopsis is horrible to work with, it doesn't fix much.
>>
>> Derick
>
> Agreed.
>
> Going back a page to
> http://www.docbook.org/tdg/en/html/classname.html:
>
> "DocBook does not contain a complete set of inlines appropriate for
> describing object-oriented programming environments. (While it has
> ClassName, for example, it has nothing suitable for methods.) This
> will be addressed in a future version of DocBook."
>
> Hence the need to form your own solutions.
>
> Steph
Not necessarily. <classname> is like <function>. Again:
http://www.docbook.org/tdg/en/html/classsynopsis.html
classsynopsis ::=
((ooclass|oointerface|ooexception)+,
(classsynopsisinfo|fieldsynopsis|constructorsynopsis|
destructorsynopsis|METHODSYNOPSIS)*)
We can set up stylesheets to render a <classsynopsis> with yours
constructors, fields and methods in extension's front page and in a file as
http://www.php.net/manual/pt_BR/class.dir.php.
The real problem, then, is how to set up a stylesheet that it is capable of
differentiate and render "global" functions from object's methods.
I am considering something as:
<function>close<function> -> closedir()
<function><class>dir</class>close</function> -> dir->close() [ugly]
<function><class>dir</class><function>close</function></function>
->
dir->close() [more ugly]
But what I wanted realy was one tag <method> like
classsynopsis ::= ooclass,methodname // or s/ooclass/class
to write docs as:
<method><ooclass>dir</ooclass><methodname>close</methodname></method>
What it is much more pretty and easy to make to point to an address as
class.dir.method.close.html...
---------------------------------------------------------------------------
Or still to change all manual from methodsynopsys/methodname/methodparam to
funcsynopsis/funcparams/parameter... And I'm not crazy ;)
http://www.docbook.org/tdg/en/html/funcsynopsis.html
This is one of the few places where DocBook attempts to model as well as
describe. Using FuncSynopsis for languages that are unrelated to C may prove
difficult.
And again (again)
http://www.docbook.org/tdg/en/html/classsynopsis.html
A ClassSynopsis contains the syntax summary of a class (generally speaking,
a class in the object-oriented programming language sense).
This and the <method> tag may simplifies our lives.
[]s
André Æ
PS: as always, pardon my google's English ;)