Node.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. declare(strict_types=1);
  3. namespace Sabre\DAV;
  4. /**
  5. * Node class.
  6. *
  7. * This is a helper class, that should aid in getting nodes setup.
  8. *
  9. * @copyright Copyright (C) fruux GmbH (https://fruux.com/)
  10. * @author Evert Pot (http://evertpot.com/)
  11. * @license http://sabre.io/license/ Modified BSD License
  12. */
  13. abstract class Node implements INode
  14. {
  15. /**
  16. * Returns the last modification time as a unix timestamp.
  17. *
  18. * If the information is not available, return null.
  19. *
  20. * @return int
  21. */
  22. public function getLastModified()
  23. {
  24. return null;
  25. }
  26. /**
  27. * Deletes the current node.
  28. *
  29. * @throws Exception\Forbidden
  30. */
  31. public function delete()
  32. {
  33. throw new Exception\Forbidden('Permission denied to delete node');
  34. }
  35. /**
  36. * Renames the node.
  37. *
  38. * @param string $name The new name
  39. *
  40. * @throws Exception\Forbidden
  41. */
  42. public function setName($name)
  43. {
  44. throw new Exception\Forbidden('Permission denied to rename file');
  45. }
  46. }