PHP 8.2.30
Preview: VariableNodeDefinition.php Size: 1.63 KB
//opt/cloudlinux/alt-php55/root/usr/share/pear/Symfony/Component/Config/Definition/Builder/VariableNodeDefinition.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\Builder;

use Symfony\Component\Config\Definition\VariableNode;

/**
 * This class provides a fluent interface for defining a node.
 *
 * @author Johannes M. Schmitt <schmittjoh@gmail.com>
 */
class VariableNodeDefinition extends NodeDefinition
{
    /**
     * Instantiate a Node
     *
     * @return VariableNode The node
     */
    protected function instantiateNode()
    {
        return new VariableNode($this->name, $this->parent);
    }

    /**
     * {@inheritDoc}
     */
    protected function createNode()
    {
        $node = $this->instantiateNode();

        if (null !== $this->normalization) {
            $node->setNormalizationClosures($this->normalization->before);
        }

        if (null !== $this->merge) {
            $node->setAllowOverwrite($this->merge->allowOverwrite);
        }

        if (true === $this->default) {
            $node->setDefaultValue($this->defaultValue);
        }

        $node->setAllowEmptyValue($this->allowEmptyValue);
        $node->addEquivalentValue(null, $this->nullEquivalent);
        $node->addEquivalentValue(true, $this->trueEquivalent);
        $node->addEquivalentValue(false, $this->falseEquivalent);
        $node->setRequired($this->required);

        if (null !== $this->validation) {
            $node->setFinalValidationClosures($this->validation->rules);
        }

        return $node;
    }

}

Directory Contents

Dirs: 0 × Files: 17

Name Size Perms Modified Actions
14.24 KB lrw-r--r-- 2019-12-18 11:24:05
Edit Download
945 B lrw-r--r-- 2019-12-18 11:24:05
Edit Download
1.18 KB lrw-r--r-- 2019-12-18 11:24:05
Edit Download
5.04 KB lrw-r--r-- 2019-12-18 11:24:05
Edit Download
761 B lrw-r--r-- 2019-12-18 11:24:05
Edit Download
772 B lrw-r--r-- 2019-12-18 11:24:05
Edit Download
1.37 KB lrw-r--r-- 2019-12-18 11:24:05
Edit Download
5.92 KB lrw-r--r-- 2019-12-18 11:24:05
Edit Download
7.23 KB lrw-r--r-- 2019-12-18 11:24:05
Edit Download
446 B lrw-r--r-- 2019-12-18 11:24:05
Edit Download
1.55 KB lrw-r--r-- 2019-12-18 11:24:05
Edit Download
1.59 KB lrw-r--r-- 2019-12-18 11:24:05
Edit Download
607 B lrw-r--r-- 2019-12-18 11:24:05
Edit Download
733 B lrw-r--r-- 2019-12-18 11:24:05
Edit Download
1.64 KB lrw-r--r-- 2019-12-18 11:24:05
Edit Download
1.09 KB lrw-r--r-- 2019-12-18 11:24:05
Edit Download
1.63 KB lrw-r--r-- 2019-12-18 11:24:05
Edit Download

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