Re: improving object oriented / procedural combinations
| From: | Hannes Magnusson | Date: | Mon, 26 Apr 2010 08:08:44 +0000 |
| Subject: | Re: improving object oriented / procedural combinations | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969381735@lists.php.net to get a copy of this message | ||
On Mon, Apr 26, 2010 at 04:10, Daniel Convissor
<danielc@analysisandsolutions.com> wrote:
> Hi Hannes:
>
> On Sun, Apr 25, 2010 at 03:44:32PM +0200, Hannes Magnusson wrote:
>> On Sun, Apr 25, 2010 at 15:39, Daniel Convissor
>> <danielc@analysisandsolutions.com> wrote:
>>
>> > What seems clearest to me is to have Example #1 be drop dead simple use
>> > case and be composed of an OOP programlisting, a procedural
>> > programlisting and finally the screen output. ?Any further examples will
>> > only be in OOP. ?How does that sound?
>>
>> Good, but shouldn't it be in the same progrramlisting, in seperate examples?
>
> I committed one example the way Peter suggested. Take a look at
> http://docs.php.net/manual/en/datetime.modify.php and let me
> know what
> you think.
I think a new entity saying "Both examples above will output" is needed..
Looks great though.
>> >> > Perhaps:
>> >> > ? ?public int mysqli->affected_rows
>> >> >
>> >> > Or if it's static:
>> >> > ? ?public int mysqli::affected_rows
>>
>> Just makeup some fun markup and we'll teach PhD it.
>
> STATIC
> ------
> DocBook:
> <classsynopsis>
> <ooclass><classname>foo</classname></ooclass>
> <fieldsynopsis>
> <modifier>public</modifier>
> <modifier>static</modifier>
> <type>int</type>
> <varname>bar</varname>
> </fieldsynopsis>
> </classsynopsis>
>
> HTML:
> <div class="refsect1 description">
> <h3 class="title">Description</h3>
> <p class="para">Object oriented style</p>
> <div class="fieldsynopsis">
> <span class="modifier">public</span>
> <span class="modifier">static</span>
> <span class="type">int</span>
> <span class="classname">foo</span>::$<var
> class="varname">bar</var>
> </div>
> </div>
>
>
> OBJECT
> ------
> DocBook:
> <classsynopsis>
> <ooclass><classname>foo</classname></ooclass>
> <fieldsynopsis>
> <modifier>public</modifier>
> <type>int</type>
> <varname>bar</varname>
> </fieldsynopsis>
> </classsynopsis>
>
> HTML:
> <div class="refsect1 description">
> <h3 class="title">Description</h3>
> <p class="para">Object oriented style</p>
> <div class="fieldsynopsis">
> <span class="modifier">public</span>
> <span class="type">int</span>
> $<span class="classname">foo</span>-><var
> class="varname">bar</var>
> </div>
> </div>
Is the html already generated by PhD like this?
And the CSS will make it look pretty without breaking other styles?
-Hannes