php - what is $this->load->view() in CodeIgniter -


$this use current class , view method load. property?

is example correct?

class super{      public $property;      public function superf1()     {         echo "hello";     }     public function col()     {         $this->superf1();     }      $this->property->super1();  } 

yes, load property. think of this:

class loader {     public function view() {         //code...     } }  class myclass {      private $load;       public __constructor() {          $this->load = new loader();      }       public somemethod() {          $this->load->view();      } } 

this syntax called chaining.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -