WPSEO_Sitemap_Cache_Data::__serialize()publicYoast 17.8.0

String representation of object.

{@internal This magic method is only "magic" as of PHP 7.4 in which the magic method was introduced.}

{} Это метод класса: WPSEO_Sitemap_Cache_Data{}

Хуков нет.


Массив. The data to be serialized.


$WPSEO_Sitemap_Cache_Data = new WPSEO_Sitemap_Cache_Data();
$WPSEO_Sitemap_Cache_Data->__serialize() // phpcs:ignore PHPCompatibility.FunctionNameRestrictions.NewMagicMethods.__serializeFound;

Список изменений

С версии 17.8.0 Введена.

Код WPSEO_Sitemap_Cache_Data::__serialize() Yoast 19.10

public function __serialize() { // phpcs:ignore PHPCompatibility.FunctionNameRestrictions.NewMagicMethods.__serializeFound

	$data = [
		'status' => $this->status,
		'xml'    => $this->sitemap,

	return $data;