WPSEO_Sitemap_Cache_Data_Interface{}Yoast 1.0

Cache Data interface.

Хуков нет.

Использование

$WPSEO_Sitemap_Cache_Data_Interface = new WPSEO_Sitemap_Cache_Data_Interface();
// use class methods

Методы

  1. public get_sitemap()
  2. public get_status()
  3. public is_usable()
  4. public set_sitemap( $sitemap )
  5. public set_status( $usable )

Код WPSEO_Sitemap_Cache_Data_Interface{} Yoast 22.4

interface WPSEO_Sitemap_Cache_Data_Interface {

	/**
	 * Status for normal, usable sitemap.
	 *
	 * @var string
	 */
	public const OK = 'ok';

	/**
	 * Status for unusable sitemap.
	 *
	 * @var string
	 */
	public const ERROR = 'error';

	/**
	 * Status for unusable sitemap because it cannot be identified.
	 *
	 * @var string
	 */
	public const UNKNOWN = 'unknown';

	/**
	 * Set the content of the sitemap.
	 *
	 * @param string $sitemap The XML content of the sitemap.
	 *
	 * @return void
	 */
	public function set_sitemap( $sitemap );

	/**
	 * Set the status of the sitemap.
	 *
	 * @param bool|string $usable True/False or 'ok'/'error' for status.
	 *
	 * @return void
	 */
	public function set_status( $usable );

	/**
	 * Builds the sitemap.
	 *
	 * @return string The XML content of the sitemap.
	 */
	public function get_sitemap();

	/**
	 * Get the status of this sitemap.
	 *
	 * @return string Status 'ok', 'error' or 'unknown'.
	 */
	public function get_status();

	/**
	 * Is the sitemap content usable ?
	 *
	 * @return bool True if the sitemap is usable, False if not.
	 */
	public function is_usable();
}