Possible duplicate of Reference - What does this symbol mean in PHP?
What does it mean when you have something like this $this->_view->id
?
It is within a class (obviously) and I understand the $this. I get how to use one -> to refer to a property or call a method. But what about when there are two -> in one thing?
The fuller code is:
$viewid = ($this->_view) ? $this->_view->id : null;
I'm guessing the overall gist is: Set $viewid
to either (1) the value of $this->_view->id
or (2) null, depending on whether $this->_view
is TRUE or not. But I don't get the (1) bit.
Also, is it conventional to use an underscore (_view) to show a property or a method?
Thanks.