add() public static method

public static add ( $key, $data )
Example #1
0
 public function testAutoSaveRemoveByPrefix()
 {
     AutoSave::add('red', 'value');
     AutoSave::add('really', 'value');
     AutoSave::add('reaper', 'value');
     AutoSave::removeAllByPrefix('rea');
     $this->assertEquals(Autosave::get('red'), 'value');
     $this->assertNull(Autosave::get('really'));
     $this->assertNull(Autosave::get('reaper'));
 }
Example #2
0
 public static function saveFormData($patient_id, $queue_id, $data)
 {
     $key = static::getAutoSaveKey($patient_id, $queue_id);
     \AutoSave::add($key, $data);
 }