Horde_ActiveSync_Device::save PHP Method

save() public method

Save the dirty device info data.
public save ( boolean $all = true )
$all boolean If true, save all properties (deviceInfo and deviceProperties). Otherwise, just save dirty deviceProperties. @since 2.16.0
    public function save($all = true)
    {
        if ($all) {
            $this->_state->setDeviceInfo($this, $this->_dirty);
        }
        if (!empty($this->_dirty['properties'])) {
            $this->_state->setDeviceProperties($this->properties, $this->id);
        }
        $this->_dirty = array();
    }

Usage Example

Exemplo n.º 1
0
Arquivo: Base.php Projeto: horde/horde
 /**
  * @return [type] [description]
  */
 protected function _testListDevices()
 {
     $devices = self::$state->listDevices();
     $this->assertCount(1, $devices);
     $deviceInfo = new Horde_ActiveSync_Device(self::$state);
     $deviceInfo->rwstatus = 0;
     $deviceInfo->deviceType = 'Test Device';
     $deviceInfo->userAgent = 'Horde Tests';
     $deviceInfo->id = 'dev123';
     $deviceInfo->user = '******';
     $deviceInfo->policykey = 123;
     $deviceInfo->supported = array();
     $deviceInfo->save();
     $devices = self::$state->listDevices();
     $this->assertCount(2, $devices);
 }
All Usage Examples Of Horde_ActiveSync_Device::save