本文整理匯總了PHP中FieldSet::set方法的典型用法代碼示例。如果您正苦於以下問題:PHP FieldSet::set方法的具體用法?PHP FieldSet::set怎麽用?PHP FieldSet::set使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類FieldSet
的用法示例。
在下文中一共展示了FieldSet::set方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: set
function set($key, $val)
{
$oldVal = $this->get($key);
if ($oldVal == $val) {
return;
}
// we would use '===' here, but we can't be sure
// that form data from the user will be of the same
// variable type. ie, "5" == 5 is true, but "5" === 5
// is not
parent::set($key, $val);
$this->_changed[$key] = true;
}
示例2: error
/**
* This function prints out an error message to tell the user that something went wrong in the startup check process.
* @access private
* @return void
* @static
*/
static function error($string)
{
$f = new FieldSet();
$f->set("pageTitle", _("Startup Error"));
$f->set("intro", _("The startup process has encountered a problem"));
$f->set("errorString", $string);
$tpl = new Template("error.tpl.php", POLYPHONY . "/main/library/StartupCheck/");
$tpl->output($f);
exit(1);
// exit with error
}