本文整理汇总了PHP中BaseModel::drop方法的典型用法代码示例。如果您正苦于以下问题:PHP BaseModel::drop方法的具体用法?PHP BaseModel::drop怎么用?PHP BaseModel::drop使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseModel
的用法示例。
在下文中一共展示了BaseModel::drop方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: drop
/**
* 删除商品品牌
*
* @author Hyber
* @param string $conditions
* @param string $fields
* @return void
*/
function drop($conditions, $fields = '')
{
$droped_rows = parent::drop($conditions, $fields);
if ($droped_rows) {
restore_error_handler();
reset_error_handler();
}
return $droped_rows;
}
示例2: drop
function drop($file_id)
{
$files = $this->find($file_id);
foreach ($files as $file) {
$file_path = ROOT_PATH . '/' . $file['file_path'];
file_exists($file_path) && unlink($file_path);
}
return parent::drop($file_id);
}
示例3: drop
function drop($conditions, $fields = 'portrait')
{
if ($droped_rows = parent::drop($conditions, $fields)) {
restore_error_handler();
$droped_data = $this->getDroppedData();
foreach ($droped_data as $row) {
$row['portrait'] && @unlink(ROOT_PATH . '/' . $row['portrait']);
}
reset_error_handler();
}
return $droped_rows;
}
示例4: drop
/**
* 删除友情链接
*
* @author Garbin
* @param string $conditions
* @param string $fields
* @return void
*/
function drop($conditions, $fields = 'logo')
{
$droped_rows = parent::drop($conditions, $fields);
if ($droped_rows) {
restore_error_handler();
$droped_data = $this->getDroppedData();
foreach ($droped_data as $key => $value) {
if ($value['logo']) {
@unlink(ROOT_PATH . '/' . $value['logo']);
//删除Logo文件
}
}
reset_error_handler();
}
return $droped_rows;
}
示例5: drop
function drop($conditions, $fields = '')
{
/* 清除缓存 */
$goods_list = $this->find(array('fields' => 'goods_id', 'conditions' => $conditions));
foreach ($goods_list as $goods) {
$this->clear_cache($goods['goods_id']);
}
/* 清除店铺商品数缓存 */
$cache_server =& cache_server();
$cache_server->delete('goods_count_of_store');
return parent::drop($conditions, $fields);
}
示例6: drop
function drop($conditions, $fields = '')
{
/* 清除缓存 */
$store_list = $this->find(array('fields' => 'store_id', 'conditions' => $conditions));
foreach ($store_list as $store) {
$this->clear_cache($store['store_id']);
}
return parent::drop($conditions, $fields);
}
示例7: drop
function drop($conditions, $fields = '')
{
$this->clear_cache();
return parent::drop($conditions, $fields);
}