<?php
/**
 * Base class for deployment configuration providers.
 *
 * @package Ealab\Deployer
 */

namespace EaLab\WP_Deployer\vendor\Ealab\Deployer\Utility\DeployerConfigRepository;

use EaLab\WP_Deployer\vendor\Dakwamine\Component\ComponentBasedObject;

/**
 * Base class for deployment configuration providers.
 */
abstract class ConfigRepositoryBase extends ComponentBasedObject {
	/**
	 * The collected config.
	 *
	 * @var array|null
	 */
	protected ?array $deployerConfig = null;

	/**
	 * Gets the deployment configuration.
	 *
	 * This method should be implemented by subclasses to provide
	 * the actual configuration retrieval logic.
	 *
	 * @return array|null The deployment configuration or null if not available.
	 * @throws \Exception If there's an error retrieving the configuration.
	 */
	abstract public function getConfig(): ?array;
}
