本文整理汇总了PHP中Configuration::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP Configuration::delete方法的具体用法?PHP Configuration::delete怎么用?PHP Configuration::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Configuration
的用法示例。
在下文中一共展示了Configuration::delete方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: uninstall
public function uninstall()
{
if (!parent::uninstall() || !Configuration::delete('MOD_BLOCKHOMECATS_CATS')) {
return false;
}
return true;
}
示例2: flushRoutes
public function flushRoutes()
{
\Configuration::delete('admin_routes');
return \Redirect::to('admin');
}
示例3: remove
/**
* Remove configuration value in database with specified key
* #### Example
* ```php
* global $conf; // global var, contain configurations
* echo $conf->remove('myNewConfigKey'); //delete myNewConfigKey from 'conf' default namespace
* echo $conf->remove('myNewConfigKey','myCustomPluginConfig'); //delete myNewConfigKey from 'myCustomPluginConfig' namespace
* ```
* @param string configuration key
* @param string configuration namespace (default is 'conf')
*/
public function remove($key, $ns = 'conf')
{
$configurationManager = new Configuration();
if (isset($this->confTab[$ns][$key])) {
$configurationManager->delete(array('key' => $ns . ':' . $key));
}
unset($this->confTab[$ns][$key]);
unset($_SESSION['configuration']);
}
示例4: Sensor
<?php
/*
Le code contenu dans cette page ne sera éxecuté qu'à la désactivation du plugin
Vous pouvez donc l'utiliser pour supprimer des tables SQLite, des dossiers, ou executer une action
*/
require_once 'Sensor.class.php';
require_once 'SensorType.class.php';
$table = new Sensor();
$table2 = new SensorType();
$table->drop();
$table2->drop();
$conf = new Configuration();
$conf->delete(array('key' => 'plugin_sensor_receptor_pin'));
$table_section = new Section();
$id_section = $table_section->load(array("label" => "sensor"))->getId();
$id_section2 = $table_section->load(array("label" => "sensortypes"))->getId();
$table_section->delete(array('label' => 'sensor'));
$table_section2->delete(array('label' => 'sensortypes'));
$table_right = new Right();
$table_right->delete(array('section' => $id_section));
$table_right->delete(array('section' => $id_section2));