<?php /** * Copyright 2009, 2010 AEGEE-Europe * * This file is part of AEGEE-Europe Online Membership System. * * AEGEE-Europe Online Membership System is free software: you can * redistribute it and/or modify it under the terms of the GNU General * Public License as published by the Free Software Foundation, either * version 3 of the License, or (at your option) any later version. * * AEGEE-Europe Online Membership System is distributed in the hope * that it will be useful, but WITHOUT ANY WARRANTY; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with AEGEE-Europe Online Membership System. If not, see * <http://www.gnu.org/licenses/>. */ /** * Amendments Service */ require_once(FILESYSTEMROOTPATH."jc/include/dao/AmendmentsDao.php"); class AmendmentsService { private $amendmentsDao; /** * Default constructor * * @param AmendmentsDao */ public function __construct(AmendmentsDao $amendmentsDao) { $this->amendmentsDao = $amendmentsDao; } /** * Load an Amendment by id * * @param string id of the Amendment to be loaded * @return an Amendment object */ public function load($id) { return $this->amendmentsDao->load($id); } public function loadByProposalId_Order($proposal_id, $order, $accepted){ return $this->amendmentsDao->loadByProposalId_Order($proposal_id, $order, $accepted); } public function saveHeader(Amendments $model, $type){ return $this->amendmentsDao->saveHeader($model, $type); } /** * Save or update Amendments: * * @param Amendments object */ public function SaveOrUpdate($amendment){ return $this->amendmentsDao->saveOrUpdate($amendment); } } ?>