WP_AI_Client_Cache::iterable_to_array( iterable $items ): array<mixed>

In this article

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only by core. It is listed here for completeness.

Converts an iterable to an array.

Parameters

$items<span class="iterable”>iterablerequired
The iterable to convert.

Return

array<mixed> The array.

Source

private function iterable_to_array( $items ): array {
	if ( is_array( $items ) ) {
		return $items;
	}

	return iterator_to_array( $items );
}

Changelog

VersionDescription
7.0.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.