public function get() { $this->query = "CALL SP_SELECT_PROJECTS();"; $this->get_results_from_query(); if (count($this->rows) > 0) { $i = 0; foreach ($this->rows as $row) { $project = new Project(); foreach ($row as $property => $value) { $project->set_Data($property, $value); } $this->projects[$i] = $project; $i = $i + 1; } $this->message = 'Proyectos encontrados'; } else { $this->message = 'No existen proyectos'; } }