misuzu/src/Config/IConfig.php

30 lines
1.2 KiB
PHP
Raw Permalink Normal View History

2023-01-01 20:23:53 +00:00
<?php
namespace Misuzu\Config;
2023-07-18 21:48:44 +00:00
use Misuzu\Pagination;
2023-01-01 20:23:53 +00:00
interface IConfig {
public function scopeTo(string $prefix): IConfig;
2023-07-18 21:48:44 +00:00
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;
2023-01-01 20:23:53 +00:00
}