FileOverwritingAdapterStub.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <?php
  2. namespace League\Flysystem\Stub;
  3. use League\Flysystem\Adapter\CanOverwriteFiles;
  4. use League\Flysystem\AdapterInterface;
  5. use League\Flysystem\Config;
  6. /**
  7. * @codeCoverageIgnore
  8. */
  9. class FileOverwritingAdapterStub implements AdapterInterface, CanOverwriteFiles
  10. {
  11. public $writtenPath = '';
  12. public $writtenContents = '';
  13. public function write($path, $contents, Config $config)
  14. {
  15. $this->writtenPath = $path;
  16. $this->writtenContents = $contents;
  17. return true;
  18. }
  19. public function writeStream($path, $resource, Config $config)
  20. {
  21. $this->writtenPath = $path;
  22. $this->writtenContents = stream_get_contents($resource);
  23. return true;
  24. }
  25. public function update($path, $contents, Config $config)
  26. {
  27. }
  28. public function updateStream($path, $resource, Config $config)
  29. {
  30. }
  31. public function rename($path, $newpath)
  32. {
  33. }
  34. public function copy($path, $newpath)
  35. {
  36. }
  37. public function delete($path)
  38. {
  39. }
  40. public function deleteDir($dirname)
  41. {
  42. }
  43. public function createDir($dirname, Config $config)
  44. {
  45. }
  46. public function setVisibility($path, $visibility)
  47. {
  48. }
  49. public function has($path)
  50. {
  51. }
  52. public function read($path)
  53. {
  54. }
  55. public function readStream($path)
  56. {
  57. }
  58. public function listContents($directory = '', $recursive = false)
  59. {
  60. }
  61. public function getMetadata($path)
  62. {
  63. }
  64. public function getSize($path)
  65. {
  66. }
  67. public function getMimetype($path)
  68. {
  69. }
  70. public function getTimestamp($path)
  71. {
  72. }
  73. public function getVisibility($path)
  74. {
  75. }
  76. }