TwistPHP Documentation

keepWithinRange

File path: dist/twist/Core/Models/Image/Image.model.php
Namespace: Twist\Core\Models\Image
Extends:

keepWithinRangeEnsures $intInteger is always within $intMinValue and $intMaxValue range. If $intInteger is lower than $intMinValue, $intMinValue is returned. If $intInteger is higher than $intMaxValue, $intMaxValue is returned.

Parameters

Name Type Description
$intIntegerintegern/a
$intMinValueintegern/a
$intMaxValueintegern/a

Return Values

void — No return information has been documented for this function.

Example

<?php
//Set the variables for the example
$intInteger 124;
$intMinValue 124;
$intMaxValue 124;

//Call the function keepWithinRange with the example vars
$resImage = new \Twist\Core\Models\Image\Image();
$resImage -> keepWithinRange($intInteger$intMinValue$intMaxValue);