0

Im still learning Object Oriented Programming in PHP and as i have learned if i want to access any variable or function in the class i just used the object name and this mark '->' etc :

   class phpClass {
      var $var1 = "Var1 Bitch";
      var $var2 = "constant string";
      
      function myfunc () {
        echo "hi";
      }
}
 $x = new phpClass;
 $x->myfunc();  //hi

but when i try to read a code for Atmail Mail Server Appliance i saw this code :

  $this->_helper->viewRenderer->setNoRender();
 $requestParams = $this->getRequest()->getParams();

forget the rest of the code, i just want to know what does using $v->v2->v3() mean ? as i know we used it once like my example $obj->func(); and then i can access func() from $obj but what does it mean using two of '->' at the same line ?

i have check some articles like this : Zend $this->_helper->json returns array instead of JSON but it doesnt help me that much .

Leearn2303
  • 69
  • 5

0 Answers0