PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 27.8
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v27.8
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
wordpress-seo / src / ai / content-planner / application / content-outline-command.php

content-outline-command.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 27.8, at src/ai/content-planner/application/content-outline-command.php

214 lines 3.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 use Yoast\WP\SEO\AI\Content_Planner\Domain\Category;
8
9 /**
10 * Command for requesting a content outline.
11 */
12 class Content_Outline_Command {
13
14 /**
15 * The user.
16 *
17 * @var WP_User
18 */
19 private $user;
20
21 /**
22 * The post type.
23 *
24 * @var string
25 */
26 private $post_type;
27
28 /**
29 * The language.
30 *
31 * @var string
32 */
33 private $language;
34
35 /**
36 * The editor.
37 *
38 * @var string
39 */
40 private $editor;
41
42 /**
43 * The title.
44 *
45 * @var string
46 */
47 private $title;
48
49 /**
50 * The intent.
51 *
52 * @var string
53 */
54 private $intent;
55
56 /**
57 * The explanation.
58 *
59 * @var string
60 */
61 private $explanation;
62
63 /**
64 * The keyphrase.
65 *
66 * @var string
67 */
68 private $keyphrase;
69
70 /**
71 * The meta description.
72 *
73 * @var string
74 */
75 private $meta_description;
76
77 /**
78 * The category.
79 *
80 * @var Category
81 */
82 private $category;
83
84 /**
85 * The constructor.
86 *
87 * @param WP_User $user The user.
88 * @param string $post_type The post type.
89 * @param string $language The language.
90 * @param string $editor The editor.
91 * @param string $title The title.
92 * @param string $intent The intent.
93 * @param string $explanation The explanation.
94 * @param string $keyphrase The keyphrase.
95 * @param string $meta_description The meta description.
96 * @param string $category_name The category name.
97 * @param int $category_id The category ID.
98 */
99 public function __construct(
100 WP_User $user,
101 string $post_type,
102 string $language,
103 string $editor,
104 string $title,
105 string $intent,
106 string $explanation,
107 string $keyphrase,
108 string $meta_description,
109 string $category_name,
110 int $category_id
111 ) {
112 $this->user = $user;
113 $this->post_type = $post_type;
114 $this->language = $language;
115 $this->editor = $editor;
116 $this->title = $title;
117 $this->intent = $intent;
118 $this->explanation = $explanation;
119 $this->keyphrase = $keyphrase;
120 $this->meta_description = $meta_description;
121 $this->category = new Category( $category_name, $category_id );
122 }
123
124 /**
125 * Returns the user.
126 *
127 * @return WP_User The user.
128 */
129 public function get_user(): WP_User {
130 return $this->user;
131 }
132
133 /**
134 * Returns the post type.
135 *
136 * @return string The post type.
137 */
138 public function get_post_type(): string {
139 return $this->post_type;
140 }
141
142 /**
143 * Returns the language.
144 *
145 * @return string The language.
146 */
147 public function get_language(): string {
148 return $this->language;
149 }
150
151 /**
152 * Returns the editor.
153 *
154 * @return string The editor.
155 */
156 public function get_editor(): string {
157 return $this->editor;
158 }
159
160 /**
161 * Returns the title.
162 *
163 * @return string The title.
164 */
165 public function get_title(): string {
166 return $this->title;
167 }
168
169 /**
170 * Returns the intent.
171 *
172 * @return string The intent.
173 */
174 public function get_intent(): string {
175 return $this->intent;
176 }
177
178 /**
179 * Returns the explanation.
180 *
181 * @return string The explanation.
182 */
183 public function get_explanation(): string {
184 return $this->explanation;
185 }
186
187 /**
188 * Returns the keyphrase.
189 *
190 * @return string The keyphrase.
191 */
192 public function get_keyphrase(): string {
193 return $this->keyphrase;
194 }
195
196 /**
197 * Returns the meta description.
198 *
199 * @return string The meta description.
200 */
201 public function get_meta_description(): string {
202 return $this->meta_description;
203 }
204
205 /**
206 * Returns the category.
207 *
208 * @return Category The category.
209 */
210 public function get_category(): Category {
211 return $this->category;
212 }
213 }
214