<?php
declare(strict_types=1);

namespace App\Framework\Core\System;

use Stringable;

final readonly class PhpIni implements Stringable
{
    public string $path;
    public function __construct(
    ) {
        $path = php_ini_loaded_file();
        if($path === false) {
            $path = "";
        }

        $this->path = $path;
    }

    public function isLoaded(): bool
    {
        return $this->path !== "";
    }

    public function __toString(): string
    {
        return $this->path;
    }
}
