Final Class Yiisoft\Validator\Rule\Image\ImageAspectRatio
| Inheritance | Yiisoft\Validator\Rule\Image\ImageAspectRatio |
|---|
Public Methods
Method Details
| public mixed __construct ( integer $width, integer $height, float $margin = 0 ) | ||
| $width | integer |
Expected width part for aspect ratio. For example, for |
| $height | integer |
Expected height part for aspect ratio. For example, for |
| $margin | float |
Expected margin for aspect ratio in percents. For example, with value
Defaults to |
public function __construct(
private readonly int $width,
private readonly int $height,
private readonly float $margin = 0,
) {}
Signup or Login in order to comment.