Exemplo n.º 1
0
 public function resize($width, $height = null)
 {
     if ($this->_imageShouldComeFromCloudinary($this->_getRequestedImageFile())) {
         $this->_dimensions = Dimensions::fromWidthAndHeight($width, $height ?: $width);
         return $this;
     }
     return parent::resize($width, $height);
 }
 function it_builds_with_dimensions_when_provided()
 {
     $transformationArray = self::builder()->withDimensions(Dimensions::fromWidthAndHeight('80', '90'))->build();
     $transformationArray->offsetGet('width')->shouldBe('80');
     $transformationArray->offsetGet('height')->shouldBe('90');
 }
Exemplo n.º 3
0
 private function _buildImageDimensions()
 {
     return Dimensions::fromWidthAndHeight($this->getConfigData('resize_width'), $this->getConfigData('resize_height'));
 }