Re: [PHP] Class not used as an object (Scope Resolution Operator)

2011-06-13 Thread George Langley
Thanks all. Assuming is best then to add the static in this case. But it isn't required if I birthed an object first and referenced the object, correct? Am wanting to add some variables to the class so not calling the same query so many times... Thanks again. George On 2011-06-

Re: [PHP] Class not used as an object (Scope Resolution Operator)

2011-06-09 Thread David Harkness
All of the above with a clarification: they are instance methods which you are calling statically. The object is not instantiated in this case. PHP allows this but will issue an E_STRICT warning. To remove the warning just add "static" before each of them, assuming they are only ever called statica

Re: [PHP] Class not used as an object (Scope Resolution Operator)

2011-06-09 Thread Paul M Foster
On Thu, Jun 09, 2011 at 03:42:49PM -0600, George Langley wrote: > Hi all. Am fixing some inherited code, and the previous coder created a > class, ie: > > class myClass { > function &doThis($passedVar) { > doSomething; > } > > function &doThat($anotherVar)

Re: [PHP] Class not used as an object (Scope Resolution Operator)

2011-06-09 Thread Richard Quadling
On 9 June 2011 22:42, George Langley wrote: >        Hi all. Am fixing some inherited code, and the previous coder created > a class, ie: > > class myClass { >        function &doThis($passedVar) { >                doSomething; >        } > >        function &doThat($anotherVar) { >              

[PHP] Class not used as an object (Scope Resolution Operator)

2011-06-09 Thread George Langley
Hi all. Am fixing some inherited code, and the previous coder created a class, ie: class myClass { function &doThis($passedVar) { doSomething; } function &doThat($anotherVar) { doSomethingElse; } } BUT, I don't see anywhere