| Server IP : 213.186.33.2 / Your IP : 216.73.216.39 Web Server : Apache System : Linux webm005.cluster102.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : symetry ( 21728) PHP Version : 8.2.31 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/symetry/www/wp-content/plugins/wordpress-seo/src/ai-generator/domain/ |
Upload File : |
<?php
namespace Yoast\WP\SEO\AI_Generator\Domain;
/**
* Class Suggestion_Bucket
* Represents a collection of Suggestion objects.
*/
class Suggestions_Bucket {
/**
* The suggestions.
*
* @var array<Suggestion>
*/
private $suggestions;
/**
* Class constructor.
*/
public function __construct() {
$this->suggestions = [];
}
/**
* Adds a suggestion to the bucket.
*
* @param Suggestion $suggestion The suggestion to add.
*
* @return void
*/
public function add_suggestion( Suggestion $suggestion ) {
$this->suggestions[] = $suggestion;
}
/**
* Returns the suggestions as an array.
*
* @return array<string>
*/
public function to_array() {
return \array_map(
static function ( $item ) {
return $item->get_value();
},
$this->suggestions
);
}
}