Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
peripherad
/
vendor
/
intervention
/
image
/
src
/
Intervention
/
Image
/
Gd
/
Commands
:
DestroyCommand.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php namespace Intervention\Image\Gd\Commands; use Intervention\Image\Commands\AbstractCommand; class DestroyCommand extends AbstractCommand { /** * Destroys current image core and frees up memory * * @param \Intervention\Image\Image $image * @return boolean */ public function execute($image) { // destroy image core imagedestroy($image->getCore()); // destroy backups foreach ($image->getBackups() as $backup) { imagedestroy($backup); } return true; } }