本文整理汇总了PHP中http::setGet方法的典型用法代码示例。如果您正苦于以下问题:PHP http::setGet方法的具体用法?PHP http::setGet怎么用?PHP http::setGet使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类http
的用法示例。
在下文中一共展示了http::setGet方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: validID
function validID()
{
$engine = EngineAPI::singleton();
if (!isset($engine->cleanGet['MYSQL']['formID']) || is_empty($engine->cleanGet['MYSQL']['formID']) || !validate::integer($engine->cleanGet['MYSQL']['formID'])) {
if (objects::validID($engine->cleanGet['MYSQL']['objectID'])) {
$object = objects::get($engine->cleanGet['MYSQL']['objectID']);
if ($object === FALSE) {
return FALSE;
}
http::setGet('formID', $object['formID']);
} else {
return FALSE;
}
}
return TRUE;
}
示例2: Exception
}
//////////
// Project Tab Stuff
$selectedProjects = objects::getProjects($engine->cleanGet['MYSQL']['objectID']);
localVars::add("projectOptions", projects::generateProjectChecklist($selectedProjects));
// Project Tab Stuff
//////////
localvars::add("formName", $form['title']);
localvars::add("formID", $form['ID']);
log::insert("Data Entry: Object: View Page", 0, $form['ID']);
// handle submission
if (isset($engine->cleanPost['MYSQL']['submitForm'])) {
if (forms::submit($engine->cleanGet['MYSQL']['formID']) === FALSE) {
throw new Exception("Error Submitting Form.");
}
http::setGet("objectID", localvars::get("newObjectID"));
log::insert("Data Entry: Object: Successful Submission", localvars::get("newObjectID"), $form['ID']);
} else {
if (isset($engine->cleanPost['MYSQL']['updateForm'])) {
if (forms::submit($engine->cleanGet['MYSQL']['formID'], $engine->cleanGet['MYSQL']['objectID']) === FALSE) {
throw new Exception("Error Updating Form.");
}
log::insert("Data Entry: Object: Successful update", $engine->cleanGet['MYSQL']['objectID'], $form['ID']);
} else {
if (isset($engine->cleanPost['MYSQL']['projectForm'])) {
$engine->cleanPost['MYSQL']['projects'] = isset($engine->cleanPost['MYSQL']['projects']) ? $engine->cleanPost['MYSQL']['projects'] : array();
// Add All the new ones
if (objects::addProjects($engine->cleanGet['MYSQL']['objectID'], $engine->cleanPost['MYSQL']['projects']) === FALSE) {
throw new Exception("Error adding projects to Object.");
}
log::insert("Data Entry: Object: Successful Project Update", $engine->cleanGet['MYSQL']['objectID'], $form['ID']);
示例3: ob_end_clean
include "../header.php";
// Turn off and kill engine's output buffer
$engine->obCallback = FALSE;
ob_end_clean();
recurseInsert("acl.php", "php");
$permissions = TRUE;
$type = "zip";
try {
$error = FALSE;
if (!isset($engine->cleanGet['MYSQL']['objectID'])) {
throw new Exception("No ObjectID Provided.");
}
// If we have an objectID and no formID, lookup the formID from the object and set it back into the GET
if (isset($engine->cleanGet['MYSQL']['objectID']) and !isset($engine->cleanGet['MYSQL']['formID'])) {
$object = objects::get($engine->cleanGet['MYSQL']['objectID']);
http::setGet('formID', $object['formID']);
}
// Object ID Validation
if (objects::validID(TRUE, $engine->cleanGet['MYSQL']['objectID']) === FALSE) {
throw new Exception("ObjectID Provided is invalid.");
}
if (mfcsPerms::isViewer($engine->cleanGet['MYSQL']['formID']) === FALSE) {
$permissions = FALSE;
throw new Exception("Permission Denied to view objects created with this form.");
}
if (isset($engine->cleanGet['MYSQL']['type']) && $engine->cleanGet['MYSQL']['type'] == "tar") {
$type = "tar";
}
if (is_array($object['data']['digitalFiles'])) {
$files = array();
foreach ($object['data']['digitalFiles']['files']['archive'] as $file) {
示例4: Exception
<?php
include "../header.php";
$permissions = TRUE;
try {
if (!isset($engine->cleanGet['MYSQL']['objectID']) && isset($engine->cleanPost['MYSQL']['objectID'])) {
http::setGet("objectID", $engine->cleanPost['MYSQL']['objectID']);
}
if (objects::validID() === FALSE) {
throw new Exception("ObjectID Provided is invalid.");
}
if (($object = objects::get($engine->cleanGet['MYSQL']['objectID'])) === FALSE) {
throw new Exception("Error retrieving Object");
}
if (($form = forms::get($object['formID'])) === FALSE) {
throw new Exception("Error retrieving form.");
}
if (mfcsPerms::isAdmin($object['formID']) === FALSE) {
$permissions = FALSE;
throw new Exception("Permission Denied to view objects created with this form.");
}
if (forms::isMetadataForm($object['formID']) === FALSE) {
throw new Exception("Object provided (Only Metadata can be moved).");
}
// handle submission
$return = NULL;
if (isset($engine->cleanPost['MYSQL']['moveMetadata'])) {
}
if (($compatibleForms = forms::compatibleForms($form['ID'])) === FALSE) {
throw new Exception("Error getting compatible forms");
}