feat: moneta 2.0, MONETA.Assistant payment module for PHPShop 6.7+

This commit is contained in:
2026-10-27 11:45:22 +03:00
parent 78b7405637
commit f8c12ce44a
82 changed files with 7387 additions and 58 deletions
+29
View File
@@ -0,0 +1,29 @@
<?php
declare(strict_types=1);
namespace MonetaPhpShop;
/**
* Ïóíêòû âûïàäàþùåãî ñïèñêà íàñòðîåê â ôîðìàòå `PHPShopGUI::setSelect()`: `[ïîäïèñü, çíà÷åíèå, òåêóùåå]`.
*/
final class SelectOptions
{
private function __construct() {}
/**
* @param array<string, string> $labels çíà÷åíèå -> ïîäïèñü, â ïîðÿäêå âûâîäà
* @param string $current çíà÷åíèå èç íàñòðîåê — ïóíêò ñ íèì áóäåò âûáðàí
*
* @return array<int, array{0: string, 1: string, 2: string}>
*/
public static function fromLabels(array $labels, string $current): array
{
$options = [];
foreach ($labels as $value => $label) {
$options[] = [$label, (string) $value, $current];
}
return $options;
}
}