Cheetah
RotateCommand.php
Go to the documentation of this file.
1 <?php
2 
4 
5 use \Intervention\Image\Gd\Color;
6 
8 {
15  public function execute($image)
16  {
17  $angle = $this->argument(0)->type('numeric')->required()->value();
18  $color = $this->argument(1)->value();
19  $color = new Color($color);
20 
21  // rotate image
22  $image->setCore(imagerotate($image->getCore(), $angle, $color->getInt()));
23 
24  return true;
25  }
26 }
Intervention\Image\Gd\Commands
Definition: BackupCommand.php:3
Intervention\Image\Gd\Commands\RotateCommand
Definition: RotateCommand.php:8
php
Intervention\Image\Gd\Commands\RotateCommand\execute
execute($image)
Definition: RotateCommand.php:15
Intervention\Image\Commands\AbstractCommand\argument
argument($key)
Definition: AbstractCommand.php:45
Intervention\Image\Commands\AbstractCommand
Definition: AbstractCommand.php:6
Intervention\Image\Gd\Color
Definition: Color.php:8