本文整理汇总了PHP中S3::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP S3::delete方法的具体用法?PHP S3::delete怎么用?PHP S3::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类S3
的用法示例。
在下文中一共展示了S3::delete方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: updateInfo
public function updateInfo($title, $image, $description, $repository, $con = null)
{
$this->row['title'] = $title;
$this->row['description'] = $description;
$this->row['repository'] = $repository;
$old_icon_key = null;
if ($image) {
$old_icon_key = $this->value('icon_key');
$this->row['icon_key'] = ApplicationDb::uploadIcon($image, $this->getId());
}
$this->update($con);
if ($old_icon_key) {
try {
S3::delete($old_icon_key);
} catch (Exception $e) {
error_log(__METHOD__ . '(' . __LINE__ . '): ' . get_class($e) . ":{$e->getMessage()}");
// 画像削除は失敗しても気にしない
}
}
}
示例2: removeVideo
private function removeVideo($url)
{
Trace::output($this->traceID, "removeVideo");
//----------------------------------------------------------
//init var
//----------------------------------------------------------
$chk = array("bool" => true, "traceID" => "removeVideo");
//----------------------------------------------------------
$file = str_replace($this->s3Path, "videoOrganizer_v0/", rawurldecode($url));
$chk = S3::delete($file);
if ($chk['bool']) {
$chk['message'] = 'video was successfully removed.';
}
if (!$chk['bool']) {
$chk['message'] = $file . ' does not exist.';
}
return $chk;
}
示例3: deleteFile
public function deleteFile()
{
$key = $this->getFileKey();
S3::delete($key);
}