/** * @return \Orm\Zed\Discount\Persistence\SpyDiscountVoucher */ public function getDiscountVoucherEntityByCode() { $discountVoucherEntity = new SpyDiscountVoucher(); $discountVoucherPoolEntity = new SpyDiscountVoucherPool(); $discountVoucherEntity->setVoucherPool($discountVoucherPoolEntity); return $discountVoucherEntity; }