Neos\Media\Domain\Service\ImageService::applyAdjustments PHP Метод

applyAdjustments() защищенный Метод

protected applyAdjustments ( Imagine\Image\ImageInterface $image, array $adjustments, boolean &$adjustmentsApplied ) : Imagine\Image\ImageInterface
$image Imagine\Image\ImageInterface
$adjustments array Ordered list of adjustments to apply.
$adjustmentsApplied boolean Reference to a variable that will hold information if an adjustment was actually applied.
Результат Imagine\Image\ImageInterface
    protected function applyAdjustments(ImageInterface $image, array $adjustments, &$adjustmentsApplied)
    {
        foreach ($adjustments as $adjustment) {
            if (!$adjustment instanceof ImageAdjustmentInterface) {
                throw new ImageServiceException(sprintf('Could not apply the %s adjustment to image because it does not implement the ImageAdjustmentInterface.', get_class($adjustment)), 1381400362);
            }
            if ($adjustment->canBeApplied($image)) {
                $image = $adjustment->applyToImage($image);
                $adjustmentsApplied = true;
            }
        }
        return $image;
    }