I’m looking at some code here and there are bunch of calls that are like this. I don’t have much experience with php, mainly java. Is this like if I had a Dog object that had a fur object and I wanted to call “dog.getFur().getColor();” ?
Example:
$this->tbtemp_list1->lead_time = ($this->add_lead_time->Text + $this->add_transit_time->Text);
$this->tbtemp_list1->units = $this->add_units->Text;
$this->tbtemp_list1->item_class = $this->txtClass->Value;
$this->tbtemp_list1->category = $this->add_part_category->Text;
$this->tbtemp_list1->description = $this->add_part_description->Text;
$this->tbtemp_list1->notes = $this->txtNotes->Text;
->(arrow) is object notation in PHP.It’s equivalent is the
.(dot) object notation Java.For example:
is:
In this case, you are reference a property (
lead_time) that is a property of an objectlead_timewhich is a property of an object ($this). This can go on forever provided the property is an object.