本文整理匯總了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 . "\">";
}