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