<?php
/**
 * Shared Lite extension registries.
 *
 * @package EntryFoundry
 */

namespace EntryFoundry\Core\Services\Extension;

// Public methods are intentionally self-describing registry primitives.
// phpcs:disable Squiz.Commenting, Generic.Commenting.DocComment
final class RegistryStore {
	/** @var ElementTypeRegistry|null */ private static $elements;
	/** @var HydrateStepRegistry|null */ private static $hydrate;
	/** @var ProfileRegistry|null */ private static $profiles;

	public static function elements(): ElementTypeRegistry {
		if ( ! self::$elements ) {
			self::$elements = new ElementTypeRegistry(); }
		return self::$elements;
	}
	public static function hydrate(): HydrateStepRegistry {
		if ( ! self::$hydrate ) {
			self::$hydrate = new HydrateStepRegistry(); }
		return self::$hydrate;
	}
	public static function profiles(): ProfileRegistry {
		if ( ! self::$profiles ) {
			self::$profiles = new ProfileRegistry(); }
		return self::$profiles;
	}
}
