1 | <?php |
||
12 | class OVHSwiftAdapter extends SwiftAdapter |
||
13 | { |
||
14 | /** |
||
15 | * URL base path variables for OVH service |
||
16 | * the HTTPS url is typically of the format |
||
17 | * https://storage.[REGION].cloud.ovh.net/v1/AUTH_[PROJECT_ID]/[CONTAINER_NAME]. |
||
18 | * @var array |
||
19 | */ |
||
20 | protected $urlVars; |
||
21 | |||
22 | /** Variables from the Filesystem class will be temporarily stored here */ |
||
23 | protected $specialParams; |
||
24 | |||
25 | /** |
||
26 | * Constructor. |
||
27 | * |
||
28 | * @param Container $container |
||
29 | * @param array $urlVars |
||
30 | * @param string $prefix |
||
31 | */ |
||
32 | public function __construct(Container $container, $urlVars = [], $prefix = null) |
||
38 | |||
39 | /** |
||
40 | * Custom function to comply with the Storage::url() function in laravel |
||
41 | * without checking the existence of a file (faster). |
||
42 | * |
||
43 | * @param string $path |
||
44 | * @return string |
||
45 | */ |
||
46 | public function getUrl($path) |
||
52 | |||
53 | /** |
||
54 | * Custom function to get a url with confirmed file existence. |
||
55 | * |
||
56 | * @param string $path |
||
57 | * @return string |
||
58 | */ |
||
59 | public function getUrlConfirm($path) |
||
72 | |||
73 | /** |
||
74 | * Generate a temporary URL for private containers. |
||
75 | * |
||
76 | * @param string $path |
||
77 | * @param Carbon $expiration |
||
78 | * @param array $options |
||
79 | * @return string |
||
80 | */ |
||
81 | public function getTemporaryUrl($path, $expiration, $options = []) |
||
113 | |||
114 | /** |
||
115 | * Gets the endpoint url of the bucket. |
||
116 | * |
||
117 | * @return string |
||
118 | */ |
||
119 | protected function getEndpoint() |
||
134 | |||
135 | /** |
||
136 | * Check if the url support variables have |
||
137 | * been correctly defined. |
||
138 | * |
||
139 | * @return void|BadMethodCallException |
||
140 | */ |
||
141 | protected function checkParams() |
||
149 | |||
150 | /** |
||
151 | * {@inheritdoc} |
||
152 | */ |
||
153 | public function write($path, $contents, Config $config, $size = 0) |
||
159 | |||
160 | /** |
||
161 | * Include support for object deletion. |
||
162 | * |
||
163 | * @param string $path |
||
164 | * @see Nimbusoft\Flysystem\OpenStack |
||
165 | * |
||
166 | * @return array |
||
167 | */ |
||
168 | protected function getWriteData($path) |
||
180 | } |
||
181 |