|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hi,
I'm studying some validation code and I can't figure out the meaning of "->" in the following context: ------------------- function addCheck($field){ $this->mandatory[] = $field; } function addCheckEmail($field){ $this->mandatory_mail[] = $field; ^ .... ------------------- I've spent a good amount of time trying to search for information or similar code on it without success and unfortunately I've lost where I got the code from; dumb move, I know! Is "$this->mandatory[] " simply a variable name? There are several variations in the code ( "$this->mandatory_whatever[]" ), but the format is strange to me, causing me to wonder if there is more to it than "just a variable name". I've had no definitive luck sandboxing it either. Thanks for any light you can shed for this rank newbie<g>, Twayne |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On Wed, 18 Jun 2008 19:22:44 +0200, Twayne <nobody@devnull.spamcop.net>
wrote: > Hi, > > I'm studying some validation code and I can't figure out the meaning of > "->" > in the following context: > ------------------- > function addCheck($field){ > $this->mandatory[] = $field; > } > > function addCheckEmail($field){ > $this->mandatory_mail[] = $field; > ^ > ... > ------------------- > > I've spent a good amount of time trying to search for information or > similar code on it without success and unfortunately I've lost where I > got the code from; dumb move, I know! > > Is "$this->mandatory[] " simply a variable name? There are > several variations in the code ( "$this->mandatory_whatever[]" ), but > the format is strange to me, causing me to wonder if there is more to it > than "just a variable name". > I've had no definitive luck sandboxing it either. > > Thanks for any light you can shed for this rank newbie<g>, Start here: http://nl.php.net/manual/en/language.oop5.php -- Rik Wasmus ....spamrun finished |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
Twayne wrote:
> I'm studying some validation code and I can't figure out the meaning of > "->" It's the object resolution operator. Please read the PHP manual, chapter about OOP. -- ---------------------------------- Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org- Delay not, Caesar. Read it instantly. -- Shakespeare, "Julius Caesar" 3,1 Here is a letter, read it at your leisure. -- Shakespeare, "Merchant of Venice" 5,1 [Quoted in "VMS Internals and Data Structures", V4.4, when referring to I/O system services.] |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
> Twayne wrote:
> >> I'm studying some validation code and I can't figure out the meaning >> of "->" > > It's the object resolution operator. Please read the PHP manual, > chapter about OOP. Ahh, some words to use for searches! Thanks Ivan, I think I looked about everywhere but OOP. Regards, Twayne |
|
![]() |
| Outils de la discussion | |
|
|