public function execute() { $this->_model = new \Models\User(); $this->_model->name = "Test User"; $this->_model->description = "Test description"; parent::execute(); //execute any logic (ie commands) that modifies the model }
public function execute() { $this->_model = array(); for ($i = 0; $i < 10; $i++) { $m = new \Models\Movie(); $m->title = "My Title " . $i; array_push($this->_model, $m); } //$this->_model = new \Models\User; //$this->_model->name = "Test User"; //$this->_model->description = "Test description"; parent::execute(); //execute any logic (ie commands) that modifies the model }