Submit
Path:
~
/
/
usr
/
local
/
psa
/
admin
/
plib
/
modules
/
wp-toolkit
/
vendor
/
hackzilla
/
password-generator
/
Model
/
Option
/
File Content:
IntegerOption.php
<?php namespace WPToolkitDependenciesIsolationPrefix\Hackzilla\PasswordGenerator\Model\Option; use InvalidArgumentException; class IntegerOption extends Option { private $minRange; private $maxRange; /** * {@inheritdoc} */ public function __construct(array $settings = array()) { parent::__construct($settings); $this->minRange = isset($settings['min']) ? $settings['min'] : ~\PHP_INT_MAX; $this->maxRange = isset($settings['max']) ? $settings['max'] : \PHP_INT_MAX; } /** * {@inheritdoc} */ public function setValue($value) { if (!\is_integer($value)) { throw new InvalidArgumentException('Integer required'); } if ($this->minRange > $value || $this->maxRange < $value) { throw new InvalidArgumentException('Invalid Value'); } parent::setValue($value); } /** * {@inheritdoc} */ public function getType() { return self::TYPE_INTEGER; } }
Submit
FILE
FOLDER
INFO
Name
Size
Permission
Action
BooleanOption.php
511 bytes
0644
IntegerOption.php
1022 bytes
0644
Option.php
1163 bytes
0644
OptionInterface.php
662 bytes
0644
StringOption.php
1015 bytes
0644
N4ST4R_ID | Naxtarrr