You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ymww_backend/addons/epay/library/v3/Yansongda/Pay/Direction/CollectionDirection.php

28 lines
729 B

1 year ago
<?php
declare(strict_types=1);
namespace Yansongda\Pay\Direction;
use Psr\Http\Message\ResponseInterface;
use Yansongda\Pay\Contract\DirectionInterface;
use Yansongda\Pay\Contract\PackerInterface;
use Yansongda\Pay\Exception\ContainerException;
use Yansongda\Pay\Exception\ServiceNotFoundException;
use Yansongda\Pay\Pay;
use Yansongda\Supports\Collection;
class CollectionDirection implements DirectionInterface
{
/**
* @throws ContainerException
* @throws ServiceNotFoundException
*/
public function parse(PackerInterface $packer, ?ResponseInterface $response): Collection
{
return new Collection(
Pay::get(ArrayDirection::class)->parse($packer, $response)
);
}
}