DecoratedAdapter.php 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <?php
  2. declare(strict_types=1);
  3. namespace League\Flysystem;
  4. abstract class DecoratedAdapter implements FilesystemAdapter
  5. {
  6. public function __construct(protected FilesystemAdapter $adapter)
  7. {
  8. }
  9. public function fileExists(string $path): bool
  10. {
  11. return $this->adapter->fileExists($path);
  12. }
  13. public function directoryExists(string $path): bool
  14. {
  15. return $this->adapter->directoryExists($path);
  16. }
  17. public function write(string $path, string $contents, Config $config): void
  18. {
  19. $this->adapter->write($path, $contents, $config);
  20. }
  21. public function writeStream(string $path, $contents, Config $config): void
  22. {
  23. $this->adapter->writeStream($path, $contents, $config);
  24. }
  25. public function read(string $path): string
  26. {
  27. return $this->adapter->read($path);
  28. }
  29. public function readStream(string $path)
  30. {
  31. return $this->adapter->readStream($path);
  32. }
  33. public function delete(string $path): void
  34. {
  35. $this->adapter->delete($path);
  36. }
  37. public function deleteDirectory(string $path): void
  38. {
  39. $this->adapter->deleteDirectory($path);
  40. }
  41. public function createDirectory(string $path, Config $config): void
  42. {
  43. $this->adapter->createDirectory($path, $config);
  44. }
  45. public function setVisibility(string $path, string $visibility): void
  46. {
  47. $this->adapter->setVisibility($path, $visibility);
  48. }
  49. public function visibility(string $path): FileAttributes
  50. {
  51. return $this->adapter->visibility($path);
  52. }
  53. public function mimeType(string $path): FileAttributes
  54. {
  55. return $this->adapter->mimeType($path);
  56. }
  57. public function lastModified(string $path): FileAttributes
  58. {
  59. return $this->adapter->lastModified($path);
  60. }
  61. public function fileSize(string $path): FileAttributes
  62. {
  63. return $this->adapter->fileSize($path);
  64. }
  65. public function listContents(string $path, bool $deep): iterable
  66. {
  67. return $this->adapter->listContents($path, $deep);
  68. }
  69. public function move(string $source, string $destination, Config $config): void
  70. {
  71. $this->adapter->move($source, $destination, $config);
  72. }
  73. public function copy(string $source, string $destination, Config $config): void
  74. {
  75. $this->adapter->copy($source, $destination, $config);
  76. }
  77. }