PATH:
home
/
lab2454c
/
tripvare.com
/
vendor
/
cloudinary
/
cloudinary_php
/
src
/
Transformation
/
Effect
<?php /** * This file is part of the Cloudinary PHP package. * * (c) Cloudinary * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Cloudinary\Transformation; use OutOfRangeException; /** * Class LimitedEffectQualifier * * This class is used for all effects that have a limited range of the value. * * @internal */ class LimitedEffectQualifier extends ValueEffectQualifier { /** * @var array $range The validation range. */ protected $range; /** * LimitedEffectQualifier constructor. * * @param $effectName * @param $range * @param $level * @param array $args */ public function __construct($effectName, $range, $level = null, ...$args) { parent::__construct($effectName); $this->setValidRange($range); $this->setEffectValue($level); $this->value->addValues(...$args); } /** * Sets a range for validation. * * @param array $range The range including min and max values. * * @return $this * * @internal */ public function setValidRange($range) { $this->range = $range; return $this; } /** * Internal setter of the effect value. * * @param mixed $value The value to set. * * @return LimitedEffectQualifier * * @internal */ public function setEffectValue($value) { if (is_numeric($value) && ! empty($this->range) && ($value < $this->range[0] || $value > $this->range[1])) { throw new OutOfRangeException("Value must be in range: [{$this->range[0]}, {$this->range[1]}]"); } parent::setEffectValue($value); return $this; } }
[+]
Argument
[-] Effect.php
[edit]
[+]
Pixel
[-] BlendEffectQualifier.php
[edit]
[-] EffectAction.php
[edit]
[+]
Addon
[+]
..
[-] LevelEffectAction.php
[edit]
[-] EffectActionTrait.php
[edit]
[-] ThresholdEffectAction.php
[edit]
[-] ValueEffectQualifier.php
[edit]
[-] ImageEffectTrait.php
[edit]
[-] StrengthEffectAction.php
[edit]
[+]
Color
[+]
Appearance
[-] DurationEffectAction.php
[edit]
[-] DurationEffectQualifier.php
[edit]
[+]
Playback
[+]
Misc
[-] LimitedEffectQualifier.php
[edit]
[-] ImageEffect.php
[edit]
[-] SquareSizeEffectAction.php
[edit]
[-] ThresholdEffectQualifier.php
[edit]
[-] VideoEffectTrait.php
[edit]
[-] BlendEffectAction.php
[edit]
[-] SquareSizeEffectQualifier.php
[edit]
[-] VideoEffect.php
[edit]
[-] ToleranceEffectQualifier.php
[edit]
[-] ToleranceEffectAction.php
[edit]
[-] EffectQualifier.php
[edit]
[-] StrengthEffectQualifier.php
[edit]
[-] LevelEffectQualifier.php
[edit]
[-] EffectQualifierTrait.php
[edit]
[-] CommonEffectTrait.php
[edit]