| 1 |
<?php |
| 2 |
/** |
| 3 |
* WPSEO plugin file. |
| 4 |
* |
| 5 |
* @package WPSEO\XML_Sitemaps |
| 6 |
*/ |
| 7 |
|
| 8 |
/** |
| 9 |
* Cache Data interface. |
| 10 |
*/ |
| 11 |
interface WPSEO_Sitemap_Cache_Data_Interface { |
| 12 |
|
| 13 |
/** |
| 14 |
* Status for normal, usable sitemap. |
| 15 |
* |
| 16 |
* @var string |
| 17 |
*/ |
| 18 |
public const OK = 'ok'; |
| 19 |
|
| 20 |
/** |
| 21 |
* Status for unusable sitemap. |
| 22 |
* |
| 23 |
* @var string |
| 24 |
*/ |
| 25 |
public const ERROR = 'error'; |
| 26 |
|
| 27 |
/** |
| 28 |
* Status for unusable sitemap because it cannot be identified. |
| 29 |
* |
| 30 |
* @var string |
| 31 |
*/ |
| 32 |
public const UNKNOWN = 'unknown'; |
| 33 |
|
| 34 |
/** |
| 35 |
* Set the content of the sitemap. |
| 36 |
* |
| 37 |
* @param string $sitemap The XML content of the sitemap. |
| 38 |
* |
| 39 |
* @return void |
| 40 |
*/ |
| 41 |
public function set_sitemap( $sitemap ); |
| 42 |
|
| 43 |
/** |
| 44 |
* Set the status of the sitemap. |
| 45 |
* |
| 46 |
* @param bool|string $usable True/False or 'ok'/'error' for status. |
| 47 |
* |
| 48 |
* @return void |
| 49 |
*/ |
| 50 |
public function set_status( $usable ); |
| 51 |
|
| 52 |
/** |
| 53 |
* Builds the sitemap. |
| 54 |
* |
| 55 |
* @return string The XML content of the sitemap. |
| 56 |
*/ |
| 57 |
public function get_sitemap(); |
| 58 |
|
| 59 |
/** |
| 60 |
* Get the status of this sitemap. |
| 61 |
* |
| 62 |
* @return string Status 'ok', 'error' or 'unknown'. |
| 63 |
*/ |
| 64 |
public function get_status(); |
| 65 |
|
| 66 |
/** |
| 67 |
* Is the sitemap content usable ? |
| 68 |
* |
| 69 |
* @return bool True if the sitemap is usable, False if not. |
| 70 |
*/ |
| 71 |
public function is_usable(); |
| 72 |
} |
| 73 |
|