示例#1
0
 protected function makeExternalModificationToModel(BaseModel $model, $offset)
 {
     usleep(2);
     $directory = new FooDirectory($this->getMongoDB());
     $directory->update($model, ['badMod' => $offset + 1, 'serial' => SerialUtil::newSerial()]);
     usleep(2);
 }
示例#2
0
 protected function newModelDefaults()
 {
     $out = [];
     if ($this->add_creation_date) {
         $out['creationDate'] = new MongoDate();
     }
     if ($this->use_serial) {
         $out['serial'] = SerialUtil::newSerial();
     }
     return $out;
 }