/** * Set the item of the scalar result. * * @param Validation_ScalarResultDao $scalarResult target scalar result * @param ItemDao $item target item * @throws Zend_Exception */ public function setItem($scalarResult, $item) { if (!$scalarResult instanceof Validation_ScalarResultDao) { throw new Zend_Exception('Should be a scalar result.'); } if (!$item instanceof ItemDao) { throw new Zend_Exception('Should be an item.'); } $scalarResult->setItemId($item->getKey()); parent::save($scalarResult); }
/** * Set the testing folder of the dashboard. * * @param dashboard the target dashboard * @param folder the target folder */ public function setTesting($dashboard, $folder) { if (!$dashboard instanceof Validation_DashboardDao) { throw new Zend_Exception('Should be a dasboard.'); } if (!$folder instanceof FolderDao) { throw new Zend_Exception('Should be a folder.'); } $dashboard->setTestingfolderId($folder->getKey()); parent::save($dashboard); }