NYCPHP Meetup

NYPHP.org

[nycphp-talk] oo php

David Mintz vtbludgeon at gmail.com
Fri Jun 12 13:11:12 EDT 2009


On Fri, Jun 12, 2009 at 1:08 PM, David Mintz <vtbludgeon at gmail.com> wrote:

>
>
> On Fri, Jun 12, 2009 at 8:24 AM, Greg Rundlett (freephile) <
> greg at freephile.com> wrote:
>
>> Assuming the class definition is in memory b/c the defining file is loaded
>> (require, include, auto-load),
>> you can call the method by either:
>> a) instantiating an object instance of the class and then calling the
>> method
>> b) calling the method statically (having no object).
>> See the manual for an example:
>> http://us.php.net/manual/en/language.oop5.basic.php
>>
>
> It looks like Michele's original snippet had the method marked as private.
> That means by definition that the method can only be called from within the
> class itself -- $this->somePrivateMethod()
>
>
Sorry I spoke too soon. I see Michele was talking about invoking dbConnect()
from within the private method (duh). On a second look it seems there may be
some confusion between procedural vs OO.


-- 
David Mintz
http://davidmintz.org/

The subtle source is clear and bright
The tributary streams flow through the darkness
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20090612/14081383/attachment.html>


More information about the talk mailing list