/**
  * Save given $device in the persistence provider.  This is called when loading the WURFL XML
  * data, directly after reading the complete device node.
  *
  * @param \Wurfl\Device\ModelDeviceInterface $device
  *
  * @see \Wurfl\Handlers\Chain\UserAgentHandlerChain::filter(), WURFL_Storage_Base::save()
  */
 private function classifyAndPersistDevice(ModelDeviceInterface $device)
 {
     if ($this->validateDevice($device) === false) {
         return;
     }
     array_push($this->devices, $device->id);
     if ($device->fallBack !== 'root') {
         $this->fallbacks[$device->fallBack] = $device->id;
     }
     $this->userAgentHandlerChain->filter($device->userAgent, $device->id);
     $this->persistenceProvider->save($device->id, $device);
 }