timeStart = new \DateTime(); $cc->timeStart->setTimestamp((int)$matches[1]); $cc->noteLastUpdate = (int)$matches[2]; $cc->noteId = (int)$matches[3]; return $cc; } else { return null; } } public static function fromNote(\DateTime $timeStart, MetaNote $m) : ChunkCursor { $cc = new static(); $cc->timeStart = $timeStart; $cc->noteLastUpdate = (int)$m->meta->getLastUpdate(); $cc->noteId = $m->note->getId(); return $cc; } public function toString() : string { return $this->timeStart->getTimestamp() . '-' . $this->noteLastUpdate . '-' . $this->noteId; } }