PATH:
home
/
lab2454c
/
tripvare.com
/
vendor
/
intervention
/
image
/
src
/
Intervention
/
Image
/
Imagick
/
Commands
<?php namespace Intervention\Image\Imagick\Commands; use Intervention\Image\Commands\AbstractCommand; use Intervention\Image\Exception\RuntimeException; class ResetCommand extends AbstractCommand { /** * Resets given image to its backup state * * @param \Intervention\Image\Image $image * @return boolean */ public function execute($image) { $backupName = $this->argument(0)->value(); $backup = $image->getBackup($backupName); if ($backup instanceof \Imagick) { // destroy current core $image->getCore()->clear(); // clone backup $backup = clone $backup; // reset to new resource $image->setCore($backup); return true; } throw new RuntimeException( "Backup not available. Call backup({$backupName}) before reset()." ); } }
[-] InsertCommand.php
[edit]
[-] HeightenCommand.php
[edit]
[-] BlurCommand.php
[edit]
[-] LimitColorsCommand.php
[edit]
[-] ResetCommand.php
[edit]
[-] SharpenCommand.php
[edit]
[-] TrimCommand.php
[edit]
[+]
..
[-] ColorizeCommand.php
[edit]
[-] PixelateCommand.php
[edit]
[-] GammaCommand.php
[edit]
[-] FitCommand.php
[edit]
[-] BrightnessCommand.php
[edit]
[-] InterlaceCommand.php
[edit]
[-] ContrastCommand.php
[edit]
[-] OpacityCommand.php
[edit]
[-] WidenCommand.php
[edit]
[-] InvertCommand.php
[edit]
[-] DestroyCommand.php
[edit]
[-] ResizeCommand.php
[edit]
[-] MaskCommand.php
[edit]
[-] CropCommand.php
[edit]
[-] GetSizeCommand.php
[edit]
[-] GreyscaleCommand.php
[edit]
[-] BackupCommand.php
[edit]
[-] ResizeCanvasCommand.php
[edit]
[-] ExifCommand.php
[edit]
[-] FillCommand.php
[edit]
[-] FlipCommand.php
[edit]
[-] RotateCommand.php
[edit]
[-] PickColorCommand.php
[edit]
[-] PixelCommand.php
[edit]