Re: improving object oriented / procedural combinations
| From: | Daniel Convissor | Date: | Mon, 26 Apr 2010 02:10:28 +0000 |
| Subject: | Re: improving object oriented / procedural combinations | ||
| References: | 1 2 3 4 5 6 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969381732@lists.php.net to get a copy of this message | ||
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.
> >> > 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>
The needed CSS is attached.
Thanks,
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409
--- /data/wd/php/web/php/trunk/styles/site.css 2010-04-21 20:56:12.258363737 -0400 +++ site.css 2010-04-25 21:29:51.437524257 -0400 @@ -975,7 +975,8 @@ } div.refsect1 div.methodsynopsis, div.refsect1 div.constructorsynopsis, -div.refsect1 div.destructorsynopsis { +div.refsect1 div.destructorsynopsis, +div.refsect1 div.fieldsynopsis { background-color: #fff; padding: 0.5em; border: 1px solid black;
--- /data/wd/php/web/php/trunk/styles/site.css 2010-04-21 20:56:12.258363737 -0400 +++ site.css 2010-04-25 21:29:51.437524257 -0400 @@ -975,7 +975,8 @@ } div.refsect1 div.methodsynopsis, div.refsect1 div.constructorsynopsis, -div.refsect1 div.destructorsynopsis { +div.refsect1 div.destructorsynopsis, +div.refsect1 div.fieldsynopsis { background-color: #fff; padding: 0.5em; border: 1px solid black;