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

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

json - Gson().fromJson(jsonResult, Myobject.class) return values in 0's -