Yoast\WP\SEO\Exceptions

Forbidden_Property_Mutation_Exception::cannot_unset_because_property_is_immutable()public staticYoast 1.0

Creates a Forbidden_Property_Mutation_Exception exception when an attempt is made to unset an immutable property.

Метод класса: Forbidden_Property_Mutation_Exception{}

Хуков нет.

Возвращает

Forbidden_Property_Mutation_Exception. The exception.

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

$result = Forbidden_Property_Mutation_Exception::cannot_unset_because_property_is_immutable( $property_name );
$property_name(строка) (обязательный)
The name of the immutable property.

Код Forbidden_Property_Mutation_Exception::cannot_unset_because_property_is_immutable() Yoast 22.4

public static function cannot_unset_because_property_is_immutable( $property_name ) {
	return new self( \sprintf( 'Unsetting property $%s is not supported.', $property_name ) );
}