Richard Heathfield wrote:
> On 25/06/15 10:08, Thomas 'PointedEars' Lahn wrote:
>> Richard Heathfield wrote:
>>> Are there any excellent but gentle introductions to OO PHP out there on
>>> the Web?
>> Yes.
>>
>> <
http://www.catb.org/~esr/faqs/smart-questions.html>
>
> Right. I didn't post what I'd already tried. Sorry about that.
> (Incidentally, I have just now been through ESR's entire document
> point-by-point, and that seems to be the only way that I fouled up.)
<
http://www.catb.org/~esr/faqs/smart-questions.html#prune>
Also:
Talk is cheap. Show me the code.
—Linus Torvalds
> So here's what I found in the group's archives:
>
> *
http://www.w-p.dds.nl/tinyunit.htm (which doesn't meet my needs
> because it's too abstract and focused too much on one specific task,
> unit testing).
> *
http://php.net/OOP (OOP in PHP 4) and
http://php.net/OOP5 (OOP in PHP
> 5), neither of which meet my needs because they focus on syntax (which I
> accept I'll need to learn) without explaining how one would go about
> using OO PHP in a sensible way, which is at the heart of my requirement.
You did not ask how to learn OOP, but OOP with PHP, and that chapter is
precisely about that. *Of course* it is tied to the syntax elements
required to create objects with PHP.
PHP uses class-based inheritance. I find the chapter in the PHP manual
rather instructive, and would have referred you to it; but I had learned OOP
(with Turbo Pascal, Object Pascal in Delphi, and Microsoft Visual C++)
before I learned PHP (3), and have also used several other OOPLs since then.
Not a bad start.
Appears to be well written, although class names should begin with a capital
letter (“Person”, not “person”), and camel-case is more common in PHP for
method names and formal parameters (“setName”, not “set_name”). And avoid
“==” in favor of “===”.
NAK.
> not on using OOP to cut down on repeated code.
ISTM you are actually asking for “OOP 101”. Sorry, this newsgroup is not
it.
> I looked for the FAQ for this group, but couldn't find one. Is there one?
I do not know (I know that <news:de.comp.lang.php> has one). What exactly
have you searched for?
> My question may not have been 100% smart, but I don't think it was
> exactly riddled with dumbness. I hope I have now demonstrated that I
> have at least tried to find my own answer. I'm beginning to suspect that
> the real answer is that there is no tutorial out there that meets my
> needs. I hope I'm wrong. Am I?
Mu.