| 1 |
<?php |
| 2 |
|
| 3 |
// phpcs:disable Yoast.NamingConventions.NamespaceName.MaxExceeded |
| 4 |
namespace Yoast\WP\SEO\Editors\Framework\Seo\Posts; |
| 5 |
|
| 6 |
use WP_Post; |
| 7 |
use Yoast\WP\SEO\Editors\Domain\Seo\Seo_Plugin_Data_Interface; |
| 8 |
|
| 9 |
/** |
| 10 |
* Abstract class for all post data providers. |
| 11 |
*/ |
| 12 |
abstract class Abstract_Post_Seo_Data_Provider { |
| 13 |
|
| 14 |
/** |
| 15 |
* Holds the WordPress Post. |
| 16 |
* |
| 17 |
* @var WP_Post |
| 18 |
*/ |
| 19 |
protected $post; |
| 20 |
|
| 21 |
/** |
| 22 |
* The post. |
| 23 |
* |
| 24 |
* @param WP_Post $post The post. |
| 25 |
* |
| 26 |
* @return void |
| 27 |
*/ |
| 28 |
public function set_post( WP_Post $post ): void { |
| 29 |
$this->post = $post; |
| 30 |
} |
| 31 |
|
| 32 |
/** |
| 33 |
* Method to return the compiled SEO data. |
| 34 |
* |
| 35 |
* @return Seo_Plugin_Data_Interface The specific seo data. |
| 36 |
*/ |
| 37 |
abstract public function get_data(): Seo_Plugin_Data_Interface; |
| 38 |
} |
| 39 |
|