| 1 |
<?php |
| 2 |
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure. |
| 3 |
namespace Yoast\WP\SEO\Schema_Aggregator\Application; |
| 4 |
|
| 5 |
/** |
| 6 |
* Class that represents the command to aggregate site schema map. |
| 7 |
*/ |
| 8 |
class Aggregate_Site_Schema_Map_Command { |
| 9 |
|
| 10 |
/** |
| 11 |
* The post types to include in the schema map. |
| 12 |
* |
| 13 |
* @var array<string> |
| 14 |
*/ |
| 15 |
private $post_types; |
| 16 |
|
| 17 |
/** |
| 18 |
* The constructor. |
| 19 |
* |
| 20 |
* @param array<string> $post_types The post types to include in the schema map. |
| 21 |
*/ |
| 22 |
public function __construct( array $post_types ) { |
| 23 |
$this->post_types = $post_types; |
| 24 |
} |
| 25 |
|
| 26 |
/** |
| 27 |
* Gets the post types to include in the schema map. |
| 28 |
* |
| 29 |
* @return array<string> The post types. |
| 30 |
*/ |
| 31 |
public function get_post_types(): array { |
| 32 |
return $this->post_types; |
| 33 |
} |
| 34 |
} |
| 35 |
|