Yoast\WP\SEO\Task_List\Domain\Components
Score_Task_Analyzer::__construct
The constructor.
Метод класса: Score_Task_Analyzer{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$Score_Task_Analyzer = new Score_Task_Analyzer(); $Score_Task_Analyzer->__construct( $title, $result, $result_label, $result_description );
- $title(строка) (обязательный)
- The title of the analyzer.
- $result(строка) (обязательный)
- The result.
- $result_label(строка) (обязательный)
- The human-readable label for the result.
- $result_description(строка) (обязательный)
- The description text explaining the result.
Код Score_Task_Analyzer::__construct() Score Task Analyzer:: construct Yoast 27.7
public function __construct(
string $title,
string $result,
string $result_label,
string $result_description
) {
if ( ! \in_array( $result, self::ALLOWED_RESULTS, true ) ) {
throw new InvalidArgumentException( 'Invalid result for score task analyzer' );
}
$this->title = $title;
$this->result = $result;
$this->result_label = $result_label;
$this->result_description = $result_description;
}