File indexing completed on 2025-01-26 05:29:14
0001 <?php 0002 0003 namespace Intervention\Image\Gd\Commands; 0004 0005 class HeightenCommand extends ResizeCommand 0006 { 0007 /** 0008 * Resize image proportionally to given height 0009 * 0010 * @param \Intervention\Image\Image $image 0011 * @return boolean 0012 */ 0013 public function execute($image) 0014 { 0015 $height = $this->argument(0)->type('digit')->required()->value(); 0016 $additionalConstraints = $this->argument(1)->type('closure')->value(); 0017 0018 $this->arguments[0] = null; 0019 $this->arguments[1] = $height; 0020 $this->arguments[2] = function ($constraint) use ($additionalConstraints) { 0021 $constraint->aspectRatio(); 0022 if(is_callable($additionalConstraints)) 0023 $additionalConstraints($constraint); 0024 }; 0025 0026 return parent::execute($image); 0027 } 0028 }