PluginProbe
WooCommerce / 11.0.1
WooCommerce v11.0.1
11.1.0 11.1.0-rc.2 11.1.0-rc.1 11.1.0-beta.2 11.1.0-beta.1 11.0.1 11.0.0 11.0.0-rc.3 11.0.0-rc.2 11.0.0-rc.1 11.0.0-beta.2 11.0.0-beta.1 10.9.4 10.9.3 10.9.2 10.9.1 10.9.0 10.9.0-rc.1 10.9.0-beta.2 10.9.0-beta.1 10.8.1 10.8.0 10.8.0-rc.1 10.8.0-beta.2 10.8.0-beta.1 All 648 releases
woocommerce / packages / blueprint / src / ResourceStorages / ResourceStorage.php
ResourceStorage.php
31 lines 721 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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