fkooman\RemoteStorage\MetadataStorage::updateFolder PHP Метод

updateFolder() публичный Метод

public updateFolder ( Path $p )
$p Path
    public function updateFolder(Path $p)
    {
        if (!$p->getIsFolder()) {
            throw new MetadataStorageException('not a folder');
        }
        return $this->updateDocument($p, null);
    }

Usage Example

Пример #1
0
 public function deleteDocument(Path $p, array $ifMatch = null)
 {
     if (null !== $ifMatch && !in_array($this->md->getVersion($p), $ifMatch)) {
         throw new PreconditionFailedException('version mismatch');
     }
     $deletedEntities = $this->d->deleteDocument($p);
     foreach ($deletedEntities as $d) {
         $this->md->deleteNode(new Path($d));
     }
     // increment the version from the folder containing the last deleted
     // folder and up to the user root, we cannot conveniently do this from
     // the MetadataStorage class :(
     foreach ($p->getFolderTreeToUserRoot() as $i) {
         if (null !== $this->md->getVersion(new Path($i))) {
             $this->md->updateFolder(new Path($i));
         }
     }
 }