FeedInterface.php
2 weeks ago
FeedValidatorInterface.php
5 months ago
ProductLoader.php
5 months ago
ProductMapperInterface.php
5 months ago
ProductWalker.php
5 months ago
WalkerProgress.php
5 months ago
FeedInterface.php
55 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Feed Interface. |
| 4 | * |
| 5 | * @package Automattic\WooCommerce\Internal\ProductFeed |
| 6 | */ |
| 7 | |
| 8 | declare(strict_types=1); |
| 9 | |
| 10 | namespace Automattic\WooCommerce\Internal\ProductFeed\Feed; |
| 11 | |
| 12 | /** |
| 13 | * Feed Interface. |
| 14 | * |
| 15 | * @since 10.5.0 |
| 16 | */ |
| 17 | interface FeedInterface { |
| 18 | /** |
| 19 | * Start the feed. |
| 20 | * This can create an empty file, eventually put something in it, or add a database entry. |
| 21 | * |
| 22 | * @return void |
| 23 | */ |
| 24 | public function start(): void; |
| 25 | |
| 26 | /** |
| 27 | * Add an entry to the feed. |
| 28 | * |
| 29 | * @param array $entry The entry to add. |
| 30 | * @return void |
| 31 | */ |
| 32 | public function add_entry( array $entry ): void; |
| 33 | |
| 34 | /** |
| 35 | * End the feed. |
| 36 | * |
| 37 | * @return void |
| 38 | */ |
| 39 | public function end(): void; |
| 40 | |
| 41 | /** |
| 42 | * Get the file path of the feed. |
| 43 | * |
| 44 | * @return string|null The path to the feed file, null if not ready. |
| 45 | */ |
| 46 | public function get_file_path(): ?string; |
| 47 | |
| 48 | /** |
| 49 | * Get the URL of the feed file. |
| 50 | * |
| 51 | * @return string|null The URL of the feed file, null if not ready. |
| 52 | */ |
| 53 | public function get_file_url(): ?string; |
| 54 | } |
| 55 |