PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.php > Meaning of "->"
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Meaning of "->"

Réponse
 
LinkBack Outils de la discussion
Vieux 18/06/2008, 18h22   #1
Twayne
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Meaning of "->"

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




  Réponse avec citation
Vieux 18/06/2008, 18h35   #2
Rik Wasmus
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Meaning of "->"

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
  Réponse avec citation
Vieux 18/06/2008, 18h36   #3
Iván Sánchez Ortega
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Meaning of "->"

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

  Réponse avec citation
Vieux 18/06/2008, 18h59   #4
Twayne
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Meaning of "->"

> 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


  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 08h04.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09070 seconds with 12 queries