function loadFromRows($rows) { foreach ($rows as $row) { $ticket = new SupportTicket(); $ticket->loadFromRow($row); $this->ids[] = $ticket->id; $this->tickets[] = $ticket; $this->tickets_indexed[$ticket->id] = $ticket; static::$ref_lookup[$ticket->id] = $ticket->id . "-" . strtolower(preg_replace("/[^A-Za-z0-9]/", '-', $ticket->title)); } }