<?php
namespace Misuzu\Config;

use Misuzu\Pagination;

interface IConfig {
    public function scopeTo(string $prefix): IConfig;

    public function hasValues(string|array $names): bool;
    public function removeValues(string|array $names): void;

    public function getAllValueInfos(?Pagination $pagination = null): array;
    public function getValueInfos(string|array $names): array;
    public function getValueInfo(string $name): ?IConfigValueInfo;

    public function getValues(array $specs): array;
    public function getString(string $name, string $default = ''): string;
    public function getInteger(string $name, int $default = 0): int;
    public function getFloat(string $name, float $default = 0): float;
    public function getBoolean(string $name, bool $default = false): bool;
    public function getArray(string $name, array $default = []): array;

    public function setValues(array $values): void;
    public function setString(string $name, string $value): void;
    public function setInteger(string $name, int $value): void;
    public function setFloat(string $name, float $value): void;
    public function setBoolean(string $name, bool $value): void;
    public function setArray(string $name, array $value): void;
}
