Permalink
Browse files

fixed entities to work with the new mapping

  • Loading branch information...
1 parent 8e33643 commit 9269115b09b9de56c6aff6bf406ebd769b893a1d @theodorDiaconu theodorDiaconu committed with iampersistent Jan 29, 2013
@@ -2,6 +2,7 @@
namespace Vespolina\Entity\Billing;
use Vespolina\Entity\Order\ItemInterface;
+use Doctrine\Common\Collections\ArrayCollection;
use Vespolina\Entity\Order\OrderInterface;
use Vespolina\Entity\Partner\PartnerInterface;
@@ -16,7 +17,7 @@ class BillingAgreement implements BillingAgreementInterface
protected $initialBillingDate;
protected $nextBillingDate;
protected $order;
- protected $orderItem;
+ protected $orderItems;
protected $partner;
protected $paymentGateway;
protected $numberCyclesBilled;
@@ -26,6 +27,7 @@ public function __construct()
{
$this->active = true;
$this->numberCyclesBilled = 0;
+ $this->orderItems = new ArrayCollection();
}
public function getId()
@@ -150,16 +152,21 @@ public function getOrder()
return $this->order;
}
- public function setOrderItem(ItemInterface $item)
+ public function setOrderItems($items)
{
- $this->orderItem = $item;
+ $this->orderItems = $items;
return $this;
}
- public function getOrderItem()
+ public function getOrderItems()
{
- return $this->orderItem;
+ return $this->orderItems;
+ }
+
+ public function addOrderItem(ItemInterface $item)
+ {
+ $this->orderItems->add($item);
}
public function setPartner(PartnerInterface $partner)
@@ -65,9 +65,9 @@ function setOrder(OrderInterface $order);
function getOrder();
- function setOrderItem(ItemInterface $item);
+ function setOrderItems($items);
- function getOrderItem();
+ function getOrderItems();
function setPartner(PartnerInterface $partner);

0 comments on commit 9269115

Please sign in to comment.