# wordpress-seo/28.2/src/llms-txt/domain/available-posts/data-provider/available-posts-data.php

Yoast SEO – Advanced SEO with real-time guidance and built-in AI, version 28.2. 43 lines.

- Page: https://pluginprobe.com/plugins/wordpress-seo/28.2/code/src/llms-txt/domain/available-posts/data-provider/available-posts-data.php
- Raw: https://pluginprobe.com/plugins/wordpress-seo/28.2/raw/src/llms-txt/domain/available-posts/data-provider/available-posts-data.php
- Modified: 2026-01-20T12:23:48+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wordpress-seo/28.2/code/src/llms-txt/domain/available-posts/data-provider/available-posts-data.php#L10-L20`.

```php
<?php

// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure.
// phpcs:disable Yoast.NamingConventions.NamespaceName.MaxExceeded -- Needed in the folder structure.
namespace Yoast\WP\SEO\Llms_Txt\Domain\Available_Posts\Data_Provider;

use Yoast\WP\SEO\Llms_Txt\Domain\Content_Types\Content_Type_Entry;

/**
 * Domain object that represents a Available Posts data record.
 */
class Available_Posts_Data implements Data_Interface {

	/**
	 * The content type entry.
	 *
	 * @var Content_Type_Entry
	 */
	private $content_type_entry;

	/**
	 * The constructor.
	 *
	 * @param Content_Type_Entry $content_type_entry The content type entry.
	 */
	public function __construct( Content_Type_Entry $content_type_entry ) {
		$this->content_type_entry = $content_type_entry;
	}

	/**
	 * The array representation of this domain object.
	 *
	 * @return array<string|float|int|string[]>
	 */
	public function to_array(): array {
		return [
			'id'    => $this->content_type_entry->get_id(),
			'title' => $this->content_type_entry->get_title(),
			'slug'  => $this->content_type_entry->get_slug(),
		];
	}
}

```
