composer package updates
[openemr.git] / vendor / symfony / config / Definition / Builder / BooleanNodeDefinition.php
bloba6292f74d81200b0505205fa7a158d3e16f403b2
1 <?php
3 /*
4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\Config\Definition\Builder;
14 use Symfony\Component\Config\Definition\BooleanNode;
16 /**
17 * This class provides a fluent interface for defining a node.
19 * @author Johannes M. Schmitt <schmittjoh@gmail.com>
21 class BooleanNodeDefinition extends ScalarNodeDefinition
23 /**
24 * {@inheritdoc}
26 public function __construct($name, NodeParentInterface $parent = null)
28 parent::__construct($name, $parent);
30 $this->nullEquivalent = true;
33 /**
34 * {@inheritdoc}
36 * @deprecated Deprecated since version 2.8, to be removed in 3.0.
38 public function cannotBeEmpty()
40 @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
42 return parent::cannotBeEmpty();
45 /**
46 * Instantiate a Node.
48 * @return BooleanNode The node
50 protected function instantiateNode()
52 return new BooleanNode($this->name, $this->parent);