Yoast\WP\SEO\Bulk_Editor\Domain\Updates

Post_Update_Collection{}Yoast 1.0

This class describes a collection of post updates.

Хуков нет.

Использование

$Post_Update_Collection = new Post_Update_Collection();
// use class methods

Методы

  1. public add( Post_Update $update )
  2. public get()

Код Post_Update_Collection{} Yoast 28.3

class Post_Update_Collection {

	/**
	 * The post updates.
	 *
	 * @var array<Post_Update>
	 */
	private $updates = [];

	/**
	 * Adds a post update to the collection.
	 *
	 * @param Post_Update $update The post update to add.
	 *
	 * @return void
	 */
	public function add( Post_Update $update ): void {
		$this->updates[] = $update;
	}

	/**
	 * Returns the post updates in the collection.
	 *
	 * @return array<Post_Update> The post updates in the collection.
	 */
	public function get(): array {
		return $this->updates;
	}
}