public function __construct(array $payments = []) { $this->payments = []; foreach ($payments as $payment) { $this->add($payment); } }