本文整理汇总了PHP中Expression::save方法的典型用法代码示例。如果您正苦于以下问题:PHP Expression::save方法的具体用法?PHP Expression::save怎么用?PHP Expression::save使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Expression
的用法示例。
在下文中一共展示了Expression::save方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Email
$emailMessage .= "License: " . $license->shortName . "\n\n";
$emailMessage .= "View License Record: " . $util->getPageURL() . "license.php?licenseID=" . $licenseID;
$email = new Email();
$email->to = implode(", ", $toList);
$email->subject = "Licensing - expression set to production use";
$email->message = $emailMessage;
$email->send();
$response = "Approved for terms tool display.";
} else {
$response = "Removed from terms tool display.";
}
//save it in the expression record
$expression = new Expression(new NamedArguments(array('primaryKey' => $_GET['expressionID'])));
$expression->productionUseInd = $productionUseInd;
try {
$expression->save();
echo $response;
} catch (Exception $e) {
echo $e->getMessage();
}
break;
case 'submitExpressionNote':
//if note id is sent in, this is an update
if (isset($_POST['expressionNoteID']) && $_POST['expressionNoteID'] != '') {
$expressionNote = new ExpressionNote(new NamedArguments(array('primaryKey' => $_POST['expressionNoteID'])));
$expressionNote->note = $_POST['expressionNote'];
$expressionNote->displayOrderSeqNumber = $_POST['displayOrderSeqNumber'];
try {
$expressionNote->save();
echo "Expression Note Updated Successfully.";
} catch (Exception $e) {
示例2: Expression
$expressionTypeObj->save();
$expressionTypeID = $expressionTypeObj->primaryKey;
$expressionTypeArray = $expressionTypeObj->allAsArray();
$expressionTypeInserted++;
}
$expressionObj = new Expression();
$expressionObj->documentID = $documentID;
$expressionObj->expressionTypeID = $expressionTypeID;
$expressionText = "";
foreach ($generalTerm->LicenseTextLink as $licenseTextLink) {
$expressionText .= $textArray[(string) $licenseTextLink["href"]] . "\n\n";
}
$expressionObj->documentText = $expressionText;
$expressionObj->lastUpdateDate = "0000-00-00 00:00:00";
$expressionObj->productionUseInd = "0";
$expressionObj->save();
$expressionID = $expressionObj->primaryKey;
}
}
echo "<p>" . $expressionTypeInserted . _(" Expression Type(s) Created") . "</p>";
echo "<p>" . $qualifierInserted . _(" Qualifiers Created") . "</p>";
} else {
$error = _("Cannot create XML object");
}
} else {
$error = _("Unable to upload the file");
}
if ($error) {
print "<p>" . _("Error: ") . $error . ".</p>";
} else {
}