Actions
5 months ago
Properties
2 years ago
DonationReceipt.php
2 years ago
DonationReceiptBuilder.php
2 years ago
DonationReceiptBuilder.php
29 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Give\Framework\Receipts; |
| 4 | |
| 5 | use Give\Framework\Receipts\Actions\GenerateConfirmationPageReceipt; |
| 6 | |
| 7 | class DonationReceiptBuilder |
| 8 | { |
| 9 | /** |
| 10 | * @var DonationReceipt |
| 11 | */ |
| 12 | public $donationReceipt; |
| 13 | |
| 14 | /** |
| 15 | * @since 3.0.0 |
| 16 | */ |
| 17 | public function __construct(DonationReceipt $donationReceipt) |
| 18 | { |
| 19 | $this->donationReceipt = $donationReceipt; |
| 20 | } |
| 21 | |
| 22 | /** |
| 23 | * @since 3.0.0 |
| 24 | */ |
| 25 | public function toConfirmationPage(): DonationReceipt |
| 26 | { |
| 27 | return (new GenerateConfirmationPageReceipt())($this->donationReceipt); |
| 28 | } |
| 29 | } |