HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux bsx-1-dev 6.8.0-101-generic #101-Ubuntu SMP PREEMPT_DYNAMIC Mon Feb 9 10:15:05 UTC 2026 x86_64
User: www-data (33)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: /var/www/html/wp-content/plugins/kadence-blocks/includes/resources/Shutdown/Shutdown_Collection.php
<?php declare( strict_types=1 );

namespace KadenceWP\KadenceBlocks\Shutdown;

use KadenceWP\KadenceBlocks\Shutdown\Contracts\Terminable;

/**
 * A collection of tasks that will run on the WordPress shutdown action.
 */
final class Shutdown_Collection {

	/**
	 * @var Terminable[]
	 */
	private array $tasks;

	/**
	 * @param Terminable[] $tasks The tasks to process.
	 */
	public function __construct( array $tasks = [] ) {
		$this->tasks = $tasks;
	}

	/**
	 * @return Terminable[]
	 */
	public function all(): array {
		return $this->tasks;
	}
}