public function __construct($result) { if (is_bool($result)) { $data = $result; } else { $data = array(); $this->result = $result; while ($row = $result->fetchArray(SQLITE3_ASSOC)) { $data[] = $row; } reset($data); } parent::__construct($data); }
/** * Create a query result * @param int $id The id of the entity * @param int $lastModified The date of the last modification of the entity. * @param int The id of the entity to which this result is related */ public function __construct($id, $lastModified = null, $relatedTo = null) { parent::__construct($id, $lastModified); $this->relatedTo = $relatedTo; }