1
0

IMetadataVersionBackend.php 944 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCA\Files_Versions\Versions;
  8. use OCP\Files\Node;
  9. /**
  10. * This interface edits the metadata column of a node.
  11. * Each column of the metadata has a key => value mapping.
  12. * @since 29.0.0
  13. */
  14. interface IMetadataVersionBackend {
  15. /**
  16. * Sets a key value pair in the metadata column corresponding to the node's version.
  17. *
  18. * @param Node $node the node that triggered the Metadata event listener, aka, the file version
  19. * @param int $revision the key for the json value of the metadata column
  20. * @param string $key the key for the json value of the metadata column
  21. * @param string $value the value that corresponds to the key in the metadata column
  22. * @since 29.0.0
  23. */
  24. public function setMetadataValue(Node $node, int $revision, string $key, string $value): void;
  25. }