public function saveToDir() { if (!$this->id) { throw new TerminusException('Could not save the machine token because it is missing an ID'); } $this->set('date', time()); $this->getDataStore()->set($this->id, $this->attributes); }