Automattic\WooCommerce\Vendor\GraphQL\Type\Definition
IDType::serialize
Метод класса: IDType{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$IDType = new IDType(); $IDType->serialize( $value ): string;
- $value(обязательный)
- .
Код IDType::serialize() IDType::serialize WC 10.9.1
public function serialize($value): string
{
$canCast = is_string($value)
|| is_int($value)
|| (is_object($value) && method_exists($value, '__toString'));
if (! $canCast) {
$notID = Utils::printSafe($value);
throw new SerializationError("ID cannot represent a non-string and non-integer value: {$notID}");
}
return (string) $value;
}