PHP 8.2.30
Preview: ScalarNode.php Size: 1.06 KB
//opt/cloudlinux/alt-php53/root/usr/share/pear/Symfony/Component/Config/Definition/ScalarNode.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\InvalidTypeException;

/**
 * This node represents a scalar value in the config tree.
 *
 * The following values are considered scalars:
 *   * booleans
 *   * strings
 *   * null
 *   * integers
 *   * floats
 *
 * @author Johannes M. Schmitt <schmittjoh@gmail.com>
 */
class ScalarNode extends VariableNode
{
    /**
     * {@inheritDoc}
     */
    protected function validateType($value)
    {
        if (!is_scalar($value) && null !== $value) {
            $ex = new InvalidTypeException(sprintf(
                'Invalid type for path "%s". Expected scalar, but got %s.',
                $this->getPath(),
                gettype($value)
            ));
            $ex->setPath($this->getPath());

            throw $ex;
        }
    }
}

Directory Contents

Dirs: 3 × Files: 15

Name Size Perms Modified Actions
Builder DIR
- drwxr-xr-x 2024-03-03 22:55:08
Edit Download
Dumper DIR
- drwxr-xr-x 2024-03-03 22:55:08
Edit Download
Exception DIR
- drwxr-xr-x 2024-03-03 22:55:08
Edit Download
10.73 KB lrw-r--r-- 2019-12-18 11:20:40
Edit Download
8.51 KB lrw-r--r-- 2019-12-18 11:20:40
Edit Download
939 B lrw-r--r-- 2019-12-18 11:20:40
Edit Download
612 B lrw-r--r-- 2019-12-18 11:20:40
Edit Download
1.51 KB lrw-r--r-- 2019-12-18 11:20:40
Edit Download
1009 B lrw-r--r-- 2019-12-18 11:20:40
Edit Download
875 B lrw-r--r-- 2019-12-18 11:20:40
Edit Download
1.88 KB lrw-r--r-- 2019-12-18 11:20:40
Edit Download
1.54 KB lrw-r--r-- 2019-12-18 11:20:40
Edit Download
2.79 KB lrw-r--r-- 2019-12-18 11:20:40
Edit Download
9.78 KB lrw-r--r-- 2019-12-18 11:20:40
Edit Download
631 B lrw-r--r-- 2019-12-18 11:20:40
Edit Download
560 B lrw-r--r-- 2019-12-18 11:20:40
Edit Download
1.06 KB lrw-r--r-- 2019-12-18 11:20:40
Edit Download
2.43 KB lrw-r--r-- 2019-12-18 11:20:40
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).