| 1 |
<?php |
| 2 |
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure. |
| 3 |
|
| 4 |
namespace Yoast\WP\SEO\AI\Content_Planner\Application; |
| 5 |
|
| 6 |
use WP_User; |
| 7 |
|
| 8 |
/** |
| 9 |
* Command for requesting content suggestions. |
| 10 |
*/ |
| 11 |
class Content_Suggestion_Command { |
| 12 |
|
| 13 |
/** |
| 14 |
* The user. |
| 15 |
* |
| 16 |
* @var WP_User |
| 17 |
*/ |
| 18 |
private $user; |
| 19 |
|
| 20 |
/** |
| 21 |
* The post type. |
| 22 |
* |
| 23 |
* @var string |
| 24 |
*/ |
| 25 |
private $post_type; |
| 26 |
|
| 27 |
/** |
| 28 |
* The language. |
| 29 |
* |
| 30 |
* @var string |
| 31 |
*/ |
| 32 |
private $language; |
| 33 |
|
| 34 |
/** |
| 35 |
* The editor. |
| 36 |
* |
| 37 |
* @var string |
| 38 |
*/ |
| 39 |
private $editor; |
| 40 |
|
| 41 |
/** |
| 42 |
* The constructor. |
| 43 |
* |
| 44 |
* @param WP_User $user The user. |
| 45 |
* @param string $post_type The post type. |
| 46 |
* @param string $language The language. |
| 47 |
* @param string $editor The editor. |
| 48 |
*/ |
| 49 |
public function __construct( WP_User $user, string $post_type, string $language, string $editor ) { |
| 50 |
$this->user = $user; |
| 51 |
$this->post_type = $post_type; |
| 52 |
$this->language = $language; |
| 53 |
$this->editor = $editor; |
| 54 |
} |
| 55 |
|
| 56 |
/** |
| 57 |
* Returns the user. |
| 58 |
* |
| 59 |
* @return WP_User The user. |
| 60 |
*/ |
| 61 |
public function get_user(): WP_User { |
| 62 |
return $this->user; |
| 63 |
} |
| 64 |
|
| 65 |
/** |
| 66 |
* Returns the post type. |
| 67 |
* |
| 68 |
* @return string The post type. |
| 69 |
*/ |
| 70 |
public function get_post_type(): string { |
| 71 |
return $this->post_type; |
| 72 |
} |
| 73 |
|
| 74 |
/** |
| 75 |
* Returns the language. |
| 76 |
* |
| 77 |
* @return string The language. |
| 78 |
*/ |
| 79 |
public function get_language(): string { |
| 80 |
return $this->language; |
| 81 |
} |
| 82 |
|
| 83 |
/** |
| 84 |
* Returns the editor. |
| 85 |
* |
| 86 |
* @return string The editor. |
| 87 |
*/ |
| 88 |
public function get_editor(): string { |
| 89 |
return $this->editor; |
| 90 |
} |
| 91 |
} |
| 92 |
|