Ejemplo n.º 1
0
	public function save(Pment_Models_Measure $measure)
	{
		$data = array(
			'meaId' => $measure->getMeaId(),
			'projectId' => $measure->getProjectId(),
			'meaDate' => $measure->getMeaDate(),
			'measure' => $measure->getmeasure(),
			'problem' => $measure->getProblem(),
			'contactId' => $measure->getContactId(),
			'remark' => $measure->getRemark()
		);
		if (null === ($id = $measure->getMeaId())) {
			unset($data['meaId']);
			$this->getDbTable()->insert($data);
		} else {
			$this->getDbTable()->update($data, array('meaId = ?' => $measure->getMeaId()));
		}
	}