# wordpress-seo/27.6/src/ai/content-planner/domain/section.php

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

- Page: https://pluginprobe.com/plugins/wordpress-seo/27.6/code/src/ai/content-planner/domain/section.php
- Raw: https://pluginprobe.com/plugins/wordpress-seo/27.6/raw/src/ai/content-planner/domain/section.php
- Modified: 2026-04-28T14:11:22+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/27.6/code/src/ai/content-planner/domain/section.php#L10-L20`.

```php
<?php
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure.
namespace Yoast\WP\SEO\AI\Content_Planner\Domain;

/**
 * Value object for a content outline section.
 */
class Section {

	/**
	 * The subheading text.
	 *
	 * @var string|null
	 */
	private $subheading_text;

	/**
	 * The content notes.
	 *
	 * @var array<string>
	 */
	private $content_notes;

	/**
	 * The constructor.
	 *
	 * @param array<string> $content_notes   The content notes.
	 * @param string|null   $subheading_text The subheading text.
	 */
	public function __construct( array $content_notes, ?string $subheading_text ) {
		$this->subheading_text = $subheading_text;
		$this->content_notes   = $content_notes;
	}

	/**
	 * Returns the subheading text.
	 *
	 * @return string|null The subheading text.
	 */
	public function get_subheading_text(): ?string {
		return $this->subheading_text;
	}

	/**
	 * Returns the content notes.
	 *
	 * @return array<string> The content notes.
	 */
	public function get_content_notes(): array {
		return $this->content_notes;
	}

	/**
	 * Returns this object in array format.
	 *
	 * @return array<string, string|array<string>|null> The section as an array.
	 */
	public function to_array(): array {
		return [
			'subheading_text' => $this->subheading_text,
			'content_notes'   => $this->content_notes,
		];
	}
}

```
