✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ webm004.cluster127.gra.hosting.ovh.net ​🇻​♯➤ 6.18.42-ovh-vps-grsec-zfs+ #1 SMP 🇾​♯➤ 2026

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 54.36.91.62 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.223
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ _dyuweyrj4,_dyuweyrj4r,dl

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /home/docteuh/www/plugins/Dtos//InstalledComponentDto.php
<?php

declare(strict_types=1);

namespace ReallySimplePlugins\RSS\Core\Features\Vulnerability\Dtos;

/**
 * Immutable data transfer object representing a locally installed WordPress component.
 *
 * A component can be a plugin, theme, or WordPress core. This DTO captures the
 * *runtime installation state* of that component and is primarily used to:
 * - Enrich vulnerability data with local context (installed version, update availability).
 * - Decide whether actions such as updates or notifications are relevant.
 *
 * This object contains state only:
 * - No persistence logic
 * - No vulnerability or policy logic
 * - No WordPress hook or scheduling concerns
 */
final class InstalledComponentDto
{
    /**
     * @var string Component type (`plugin`, `theme`, or `core`)
     */
    private string $type;

    /**
     * @var string Unique identifier used to match vulnerabilities
     */
    public string $slug;

    /**
     * @var string Human-readable component name
     */
    private string $name;

    /**
     * @var string Currently installed version
     */
    private string $installedVersion;

    /**
     * @var string|null Latest available version (null if unknown)
     */
    private ?string $latestVersion;

    /**
     * @var string Plugin file path (empty for themes/core)
     */
    private string $file;

    /**
     * @var bool Whether the component is currently active
     */
    private bool $isActive;

    /**
     * InstalledComponentDto constructor.
     *
     * @param string      $type           The type of the component (plugin, theme, or core)
     * @param string      $slug           Unique identifier for matching vulnerabilities
     * @param string      $name           Human-readable name of the component
     * @param string      $version        Currently installed version of the component
     * @param string|null $pluginFile     Plugin file path, or null if not applicable
     * @param bool        $isActive       Whether the component is currently active
     * @param string|null $latestVersion  Latest available version, or null if unknown
     */
    public function __construct(
        string $type,
        string $slug,
        string $name,
        string $version,
        ?string $pluginFile,
        bool $isActive,
        ?string $latestVersion
    ) {
        $this->type = $type;
        $this->slug = $slug;
        $this->name = $name;
        $this->installedVersion = $version;
        $this->file = $pluginFile ?? '';
        $this->isActive = $isActive;
        $this->latestVersion = $latestVersion;
    }

    /**
     * Get the component type.
     */
    public function getType(): string
    {
        return $this->type;
    }

    /**
     * Get the unique slug identifier.
     */
    public function getSlug(): string
    {
        return $this->slug;
    }

    /**
     * Get the human-readable component name.
     */
    public function getName(): string
    {
        return $this->name;
    }

    /**
     * Get the installed version of the component.
     */
    public function getInstalledVersion(): string
    {
        return $this->installedVersion;
    }

    /**
     * Get the latest available version of the component, or null if unknown.
     */
    public function getLatestVersion(): ?string
    {
        return $this->latestVersion;
    }

    /**
     * Determine if an update is available by comparing installed and latest versions.
     */
    public function hasUpdate(): bool
    {
        if ($this->latestVersion === null) {
            return false;
        }

        return version_compare(
            $this->installedVersion,
            $this->latestVersion,
            '<'
        );
    }

    /**
     * Get the plugin file path (empty string if not applicable).
     */
    public function getFile(): string
    {
        return $this->file;
    }

    /**
     * Check if the component is currently active.
     */
    public function isActive(): bool
    {
        return $this->isActive;
    }
}


Current_dir [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
22 Sep 2026 9.10 PM
docteuh / users
0755
ComponentVulnerabilitiesDto.php
5.876 KB
18 Jun 2026 6.25 PM
docteuh / users
0644
GridBlock.js
1.118 KB
18 Jun 2026 6.25 PM
docteuh / users
0644
HighestSeverityContextDto.php
4.453 KB
18 Jun 2026 6.25 PM
docteuh / users
0644
InstalledComponentDto.php
3.941 KB
18 Jun 2026 6.25 PM
docteuh / users
0644
LICENSE
1.045 KB
18 Jun 2026 6.25 PM
docteuh / users
0644
ModalControl.js
0.463 KB
18 Jun 2026 6.25 PM
docteuh / users
0644
TaskElement.js
4.363 KB
18 Jun 2026 6.25 PM
docteuh / users
0644
VulnerabilityRangeDto.php
3.996 KB
18 Jun 2026 6.25 PM
docteuh / users
0644
VulnerabilitySnapshotDto.php
3.905 KB
18 Jun 2026 6.25 PM
docteuh / users
0644
class-admin.php
12.73 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
hoverTooltip_bu.js
2.843 KB
18 Jun 2026 6.25 PM
docteuh / users
0644
icon-redirect-manager-20260827192224.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
xmlrpc.php
1.223 KB
23 Jun 2026 6.19 PM
docteuh / users
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF