Prev: A stupid question about classes
Next: How do I use date_diff in my code (both codes are included, mine and the example function) I need process.php
From: Nick Balestra on 2 May 2010 10:41 I am trying to understand how the joomla framework works, i see an heavy usage of " :: " in its code, here an example: function edit () { JRequest::setVar('view, 'single'); $this ->display(); } from my really basic php understanding in the function edit i call a function setVar() and i pass the paramter 'view' and 'single' in it then the output ($this) is passed to the display() function. My question is what does :: means? an more precisely referring to the example: JRequest::setVar('view, 'single'); how do you read it and how do you manage it? Cheers, Nick
From: Nick Balestra on 2 May 2010 10:48 I think si related to class and methods, JRequest Class have a method called setVar, right? if this is correct sorry for posting the question, i just haven't started yet classes and methods...;-) On May 2, 2010, at 4:41 PM, Nick Balestra wrote: > I am trying to understand how the joomla framework works, i see an heavy usage of " :: " in its code, here an example: > > function edit () > { > JRequest::setVar('view, 'single'); > $this ->display(); > } > > > from my really basic php understanding in the function edit i call a function setVar() and i pass the paramter 'view' and 'single' in it then the output ($this) is passed to the display() function. > > My question is what does :: means? an more precisely referring to the example: JRequest::setVar('view, 'single'); how do you read it and how do you manage it? > > Cheers, Nick
From: viraj on 2 May 2010 10:52 hi nick, :: is what we call 'scope resolution operator', $this is your 'current scope'. i guess you better read http://www.php.net/manual/en/language.oop5.php.. all sections :)) ~viraj On Sun, May 2, 2010 at 8:11 PM, Nick Balestra <nick(a)beyounic.com> wrote: > I am trying to understand how the joomla framework works, i see an heavy usage of  "  ::  " in its code, here an example: > > function edit () >     { >         JRequest::setVar('view, 'single'); >         $this ->display(); >     } > > > from my really basic php understanding in the function edit i call a function setVar() and i pass the paramter 'view' and 'single' in it then the output ($this) is passed to the display() function. > > My question is what does :: means? an more precisely referring to the example: JRequest::setVar('view, 'single');  how do you read it and how do you manage it? > > Cheers, Nick > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
From: Nick Balestra on 2 May 2010 11:10
Thank a lot for pointing me to this, as you wrote u are right, haven't started yet with oo so of course i wasn't able to understand what was this all about. thanks again Nick On May 2, 2010, at 4:52 PM, viraj wrote: > hi nick, > :: is what we call 'scope resolution operator', $this is your 'current scope'. > > i guess you better read > http://www.php.net/manual/en/language.oop5.php.. all sections :)) > > > ~viraj > > > > On Sun, May 2, 2010 at 8:11 PM, Nick Balestra <nick(a)beyounic.com> wrote: >> I am trying to understand how the joomla framework works, i see an heavy usage of " :: " in its code, here an example: >> >> function edit () >> { >> JRequest::setVar('view, 'single'); >> $this ->display(); >> } >> >> >> from my really basic php understanding in the function edit i call a function setVar() and i pass the paramter 'view' and 'single' in it then the output ($this) is passed to the display() function. >> >> My question is what does :: means? an more precisely referring to the example: JRequest::setVar('view, 'single'); how do you read it and how do you manage it? >> >> Cheers, Nick >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> |