<?php
declare(strict_types=1);
namespace ReallySimplePlugins\RSS\Core\Features\Vulnerability\Interfaces;
use ReallySimplePlugins\RSS\Core\Features\Vulnerability\Dtos\InstalledComponentDto;
/**
* Defines read-only access to locally installed components.
*
* Constraints: Exposes installed component state only; no persistence or business logic.
* Repositories return materialized collections intended for direct consumption by controllers and services.
*/
interface InstalledComponentRepositoryInterface
{
/**
* Return all installed plugins as a materialized list of InstalledComponentDto objects.
*
* Each DTO includes:
* - type: "plugin|theme|core"
* - slug and display name
* - installed version
* - plugin file (used by WP to identify a plugin)
* - whether the plugin is currently active (including network-active on multisite)
* - latest available version (when WordPress update information is available)
*
* Repositories may use generators internally, but the public contract always returns a materialized list.
*
* @return list<InstalledComponentDto>
*/
public function getInstalledComponents(): array;
}