本文整理汇总了PHP中Property::set_property方法的典型用法代码示例。如果您正苦于以下问题:PHP Property::set_property方法的具体用法?PHP Property::set_property怎么用?PHP Property::set_property使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Property
的用法示例。
在下文中一共展示了Property::set_property方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Property
function update_config($values = '')
{
//calls on for the database class
include_once "classes/Property.php";
$property = new Property();
//sets the properties to store them, use a switch statement to store different description based on different properties
if ($property->set_property("Plugin_HelloWorld_greetings", $_POST['Plugin_HelloWorld_greetings'], "Hello World description")) {
return true;
} else {
return false;
}
}
示例2: updateProperties
function updateProperties($properties)
{
//global all variables
global $keys, $propertyForm;
//create an empty temporary array to store all the new values given from the form
$tempArray = array();
foreach ($keys as $index => $key) {
$key = str_replace(" ", "_", $key);
$tempArray[$key] = trim($_POST[$key]);
}
print_r($tempArray);
$index = 0;
foreach ($properties as $id => $value) {
$thisProperty = new Property();
//error check
$thisProperty->set_property($id, $tempArray[$keys[$index]]);
$index++;
}
$status = "success";
echo "<meta http-equiv=\"REFRESH\" content=\"0;url=" . $_SERVER['PHP_SELF'] . "?update=" . $status . "\">";
}