Esempio n. 1
0
 /**
  * Stores properties for a resource.
  *
  * Creates a new property storage file and stores the properties given for
  * the resource identified by $path.  This depends on the affected resource
  * and the actual properties in the property storage.
  * 
  * @param string $path 
  * @param ezcWebdavBasicPropertyStorage $storage 
  * @return void
  */
 protected function storeProperties($path, ezcWebdavBasicPropertyStorage $storage)
 {
     $storagePath = $this->getPropertyStoragePath($path);
     // Create handler structure to read properties
     $handler = new ezcWebdavPropertyHandler($xml = new ezcWebdavXmlTool());
     // Create new dom document with property storage for one namespace
     $doc = new DOMDocument('1.0');
     $properties = $doc->createElement('properties');
     $doc->appendChild($properties);
     // Store and store properties
     $handler->serializeProperties($storage, $properties);
     return $doc->save($storagePath);
 }
Esempio n. 2
0
 protected function storeProperties($path, ezcWebdavBasicPropertyStorage $storage)
 {
     $storagePath = $this->options->propertyStoragePath . '/properties-' . md5($path);
     print_debug("storeProperties method {$storagePath}\n");
     // Create handler structure to read properties
     $handler = new ezcWebdavPropertyHandler($xml = new ezcWebdavXmlTool());
     // Create new dom document with property storage for one namespace
     $doc = new DOMDocument('1.0');
     $properties = $doc->createElement('properties');
     $doc->appendChild($properties);
     $handler->serializeProperties($storage, $properties);
     print_debug("storeProperties method end\n");
     return $doc->save($storagePath);
 }