Файловый менеджер - Редактировать - /home/clickysoft/public_html/somni.clickysoft.net/vendor/moneyphp/money/src/Parser/AggregateMoneyParser.php
Назад
<?php declare(strict_types=1); namespace Money\Parser; use Money\Currency; use Money\Exception; use Money\Money; use Money\MoneyParser; use function sprintf; /** * Parses a string into a Money object using other parsers. */ final class AggregateMoneyParser implements MoneyParser { /** * @var MoneyParser[] * @psalm-var non-empty-array<MoneyParser> */ private array $parsers; /** * @param MoneyParser[] $parsers * @psalm-param non-empty-array<MoneyParser> $parsers */ public function __construct(array $parsers) { $this->parsers = $parsers; } public function parse(string $money, Currency|null $fallbackCurrency = null): Money { foreach ($this->parsers as $parser) { try { return $parser->parse($money, $fallbackCurrency); } catch (Exception\ParserException $e) { } } throw new Exception\ParserException(sprintf('Unable to parse %s', $money)); } }
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка