PluginProbe
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell / 3.13.3
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell v3.13.3
3.13.3 3.13.2 3.13.1 3.13.0 3.12.13 3.12.12 3.12.11 3.12.10 3.12.9 3.12.8 3.12.7 3.12.6 3.12.5 3.12.4 3.12.3 3.12.1 3.12.2 3.12.0 3.11.1 3.11.0 3.10.9 3.10.8 3.10.7 3.10.6 2.8.16 All 261 releases
wpfunnels / vendor / league / flysystem / src / UnableToRetrieveMetadata.php

UnableToRetrieveMetadata.php in WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell 3.13.3, at vendor/league/flysystem/src/UnableToRetrieveMetadata.php

77 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 declare(strict_types=1);
4
5 namespace League\Flysystem;
6
7 use RuntimeException;
8 use Throwable;
9
10 final class UnableToRetrieveMetadata extends RuntimeException implements FilesystemOperationFailed
11 {
12 /**
13 * @var string
14 */
15 private $location;
16
17 /**
18 * @var string
19 */
20 private $metadataType;
21
22 /**
23 * @var string
24 */
25 private $reason;
26
27 public static function lastModified(string $location, string $reason = '', ?Throwable $previous = null): self
28 {
29 return static::create($location, FileAttributes::ATTRIBUTE_LAST_MODIFIED, $reason, $previous);
30 }
31
32 public static function visibility(string $location, string $reason = '', ?Throwable $previous = null): self
33 {
34 return static::create($location, FileAttributes::ATTRIBUTE_VISIBILITY, $reason, $previous);
35 }
36
37 public static function fileSize(string $location, string $reason = '', ?Throwable $previous = null): self
38 {
39 return static::create($location, FileAttributes::ATTRIBUTE_FILE_SIZE, $reason, $previous);
40 }
41
42 public static function mimeType(string $location, string $reason = '', ?Throwable $previous = null): self
43 {
44 return static::create($location, FileAttributes::ATTRIBUTE_MIME_TYPE, $reason, $previous);
45 }
46
47 public static function create(string $location, string $type, string $reason = '', ?Throwable $previous = null): self
48 {
49 $e = new static("Unable to retrieve the $type for file at location: $location. {$reason}", 0, $previous);
50 $e->reason = $reason;
51 $e->location = $location;
52 $e->metadataType = $type;
53
54 return $e;
55 }
56
57 public function reason(): string
58 {
59 return $this->reason;
60 }
61
62 public function location(): string
63 {
64 return $this->location;
65 }
66
67 public function metadataType(): string
68 {
69 return $this->metadataType;
70 }
71
72 public function operation(): string
73 {
74 return FilesystemOperationFailed::OPERATION_RETRIEVE_METADATA;
75 }
76 }
77