public function getAuthors() { if ($this->authors === null) { $db = new DbDatabase(); $this->authors = array(); $res = $db->getPersonsByQuestionIdRes($this->getId()); while ($row = $res->fetch_object()) { $this->authors[] = new DbPerson($row); } } return $this->authors; }