[ SYSTEM ]: Linux wordpress 6.1.0-44-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.164-1 (2026-03-09) x86_64
[ SERVER ]: Apache/2.4.66 (Debian) | PHP: 8.2.30
[ USER ]: www-data | IP: 172.19.30.54
GEFORCE FILE MANAGER
/
var
/
www
/
html
/
wordpress
/
wp-content
/
plugins
/
wp-optimize
/
vendor
/
rosell-dk
/
webp-convert
/
src
/
Options
/
UPLOAD:
NAME
SIZE
QUICK PERMS
ACTIONS
π Exceptions
SET
[ DEL ]
π ArrayOption.php
832 B
SET
[ EDIT ]
|
[ DEL ]
π BooleanOption.php
597 B
SET
[ EDIT ]
|
[ DEL ]
π GhostOption.php
459 B
SET
[ EDIT ]
|
[ DEL ]
π IntegerOption.php
2,079 B
SET
[ EDIT ]
|
[ DEL ]
π IntegerOrNullOption.php
1,291 B
SET
[ EDIT ]
|
[ DEL ]
π MetadataOption.php
1,211 B
SET
[ EDIT ]
|
[ DEL ]
π Option.php
5,890 B
SET
[ EDIT ]
|
[ DEL ]
π OptionFactory.php
3,358 B
SET
[ EDIT ]
|
[ DEL ]
π Options.php
5,465 B
SET
[ EDIT ]
|
[ DEL ]
π QualityOption.php
1,806 B
SET
[ EDIT ]
|
[ DEL ]
π SensitiveArrayOption.php
819 B
SET
[ EDIT ]
|
[ DEL ]
π SensitiveStringOption.php
855 B
SET
[ EDIT ]
|
[ DEL ]
π StringOption.php
1,360 B
SET
[ EDIT ]
|
[ DEL ]
DELETE SELECTED
[ CLOSE ]
EDIT: IntegerOption.php
<?php namespace WebPConvert\Options; use WebPConvert\Options\Option; use WebPConvert\Options\Exceptions\InvalidOptionValueException; /** * Abstract option class * * @package WebPConvert * @author BjΓΈrn Rosell <it@rosell.dk> * @since Class available since Release 2.0.0 */ class IntegerOption extends Option { protected $typeId = 'int'; protected $schemaType = ['integer']; protected $minValue; protected $maxValue; /** * Constructor. * * @param string $id id of the option * @param integer $defaultValue default value for the option * @throws InvalidOptionValueException if the default value cannot pass the check * @return void */ public function __construct($id, $defaultValue, $minValue = null, $maxValue = null) { $this->minValue = $minValue; $this->maxValue = $maxValue; parent::__construct($id, $defaultValue); } protected function checkMin() { if (!is_null($this->minValue) && $this->getValue() < $this->minValue) { throw new InvalidOptionValueException( '"' . $this->id . '" option must be set to minimum ' . $this->minValue . '. ' . 'It was however set to: ' . $this->getValue() ); } } protected function checkMax() { if (!is_null($this->maxValue) && $this->getValue() > $this->maxValue) { throw new InvalidOptionValueException( '"' . $this->id . '" option must be set to max ' . $this->maxValue . '. ' . 'It was however set to: ' . $this->getValue() ); } } protected function checkMinMax() { $this->checkMin(); $this->checkMax(); } public function check() { $this->checkType('integer'); $this->checkMinMax(); } public function getSchema() { $obj = parent::getSchema(); $obj['minimum'] = $this->minValue; $obj['maximum'] = $this->maxValue; return $obj; } }