X7ROOT File Manager
Current Path:
/opt/alt/php54/usr/share/pear/Symfony/Component/Config/Definition
opt
/
alt
/
php54
/
usr
/
share
/
pear
/
Symfony
/
Component
/
Config
/
Definition
/
ðŸ“
..
📄
ArrayNode.php
(10.73 KB)
📄
BaseNode.php
(8.51 KB)
📄
BooleanNode.php
(939 B)
ðŸ“
Builder
📄
ConfigurationInterface.php
(612 B)
ðŸ“
Dumper
📄
EnumNode.php
(1.51 KB)
ðŸ“
Exception
📄
FloatNode.php
(1009 B)
📄
IntegerNode.php
(875 B)
📄
NodeInterface.php
(1.88 KB)
📄
NumericNode.php
(1.54 KB)
📄
Processor.php
(2.79 KB)
📄
PrototypeNodeInterface.php
(631 B)
📄
PrototypedArrayNode.php
(9.78 KB)
📄
ReferenceDumper.php
(560 B)
📄
ScalarNode.php
(1.06 KB)
📄
VariableNode.php
(2.43 KB)
Editing: NumericNode.php
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Config\Definition; use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; /** * This node represents a numeric value in the config tree * * @author David Jeanmonod <david.jeanmonod@gmail.com> */ class NumericNode extends ScalarNode { protected $min; protected $max; public function __construct($name, NodeInterface $parent = null, $min = null, $max = null) { parent::__construct($name, $parent); $this->min = $min; $this->max = $max; } /** * {@inheritDoc} */ protected function finalizeValue($value) { $value = parent::finalizeValue($value); $errorMsg = null; if (isset($this->min) && $value < $this->min) { $errorMsg = sprintf('The value %s is too small for path "%s". Should be greater than or equal to %s', $value, $this->getPath(), $this->min); } if (isset($this->max) && $value > $this->max) { $errorMsg = sprintf('The value %s is too big for path "%s". Should be less than or equal to %s', $value, $this->getPath(), $this->max); } if (isset($errorMsg)) { $ex = new InvalidConfigurationException($errorMsg); $ex->setPath($this->getPath()); throw $ex; } return $value; } }
Upload File
Create Folder