NYCPHP Meetup

NYPHP.org

[nycphp-talk] Help with a self:: ish problem

Daniel Convissor danielc at analysisandsolutions.com
Thu Dec 6 10:40:01 EST 2007


Rick:

On Thu, Dec 06, 2007 at 10:29:09AM -0500, Rick Retzko wrote:
> Hi Cliff - Thanks.  Maybe I'm using the wrong implementation here.   My
> design is that $this->_aData['action'] could resolve to an 'update',
> 'insert' or 'delete' request and thus be directed to the appropriate
> function.  I didn't want to use a literal, but have the decision made by the
> calling routine.

What Cliff was trying to explain was you wrote the class' update() method 
to be called from an instantiated object, using the "->" syntax.  But 
you're calling it as a static method via the "::" syntax.  You need to 
pick one way or the other and carry it through the whole implementation.

Static and :: are covered here:
http://us3.php.net/manual/en/language.oop5.paamayim-nekudotayim.php
http://us3.php.net/manual/en/language.oop5.static.php

Read up on the whole OOP deal here:
http://us3.php.net/manual/en/language.oop5.php

--Dan

... snip ...

-- 
 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



More information about the talk mailing list