src/Device/DeviceRepositoryBuilder.php
private function process(DeviceIterator $deviceIterator, array $patchingDevices = array())
    {
        $usedPatches = array();

        foreach ($deviceIterator as $device) {
            /* @var $device \Wurfl\Device\ModelDeviceInterface */
            $toPatch = isset($patchingDevices[$device->id]);

            if ($toPatch) {
                $device                   = $this->patchDevice($device, $patchingDevices [$device->id]);
                $usedPatches[$device->id] = $device->id;
            }

            $this->classifyAndPersistDevice($device);
        }

        $this->classifyAndPersistNewDevices(array_diff_key($patchingDevices, $usedPatches));
        $this->persistClassifiedDevicesUserAgentMap();
    }
private function process(DeviceIterator $deviceIterator, array $patchingDevices = array())
    {
        $usedPatches = array();

        foreach ($deviceIterator as $device) {
            /* @var $device \Wurfl\Device\ModelDeviceInterface */
            $toPatch = isset($patchingDevices[$device->id]);

            if ($toPatch) {
                $device                   = $this->patchDevice($device, $patchingDevices [$device->id]);
                $usedPatches[$device->id] = $device->id;
            }

            $this->classifyAndPersistDevice($device);
        }

        $this->classifyAndPersistNewDevices(array_diff_key($patchingDevices, $usedPatches));
        $this->persistClassifiedDevicesUserAgentMap();
    }
private function process ( DeviceIterator $ deviceIterator , array $ patchingDevices = array ( ) ) { $ usedPatches = array ( ) ; foreach ( $ deviceIterator as $ device ) { /* @var $device \Wurfl\Device\ModelDeviceInterface */ $ toPatch = isset ( $ patchingDevices [ $ device -> id ] ) ; if ( $ toPatch ) { $ device = $ this -> patchDevice ( $ device , $ patchingDevices [ $ device -> id ] ) ; $ usedPatches [ $ device -> id ] = $ device -> id ; } $ this -> classifyAndPersistDevice ( $ device ) ; } $ this -> classifyAndPersistNewDevices ( array_diff_key ( $ patchingDevices , $ usedPatches ) ) ; $ this -> persistClassifiedDevicesUserAgentMap ( ) ; }
Process device iterator

@param \Wurfl\Device\Xml\DeviceIterator $deviceIterator
@param array                            $patchingDevices
Process device iterator