LocalPluginResourceStorage.php
1 year ago
LocalThemeResourceStorage.php
1 year ago
OrgPluginResourceStorage.php
1 year ago
OrgThemeResourceStorage.php
1 year ago
ResourceStorage.php
1 year ago
ResourceStorage.php
31 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Automattic\WooCommerce\Blueprint\ResourceStorages; |
| 4 | |
| 5 | /** |
| 6 | * Interface ResourceStorage |
| 7 | * |
| 8 | * ResourceStorage is an abstraction layer for various storages for WordPress files |
| 9 | * such as plugins and themes. It provides a common interface for downloading |
| 10 | * the files whether they are stored locally or remotely. |
| 11 | * |
| 12 | * @package Automattic\WooCommerce\Blueprint\ResourceStorages |
| 13 | */ |
| 14 | interface ResourceStorage { |
| 15 | /** |
| 16 | * Return supported resource type. |
| 17 | * |
| 18 | * @return string |
| 19 | */ |
| 20 | public function get_supported_resource(): string; |
| 21 | |
| 22 | /** |
| 23 | * Download the resource. |
| 24 | * |
| 25 | * @param string $slug resource slug. |
| 26 | * |
| 27 | * @return string|null downloaded local path. |
| 28 | */ |
| 29 | public function download( $slug ): ?string; |
| 30 | } |
| 31 |