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
;
17 * This class provides a fluent interface for defining a node.
19 * @author Johannes M. Schmitt <schmittjoh@gmail.com>
21 class BooleanNodeDefinition
extends ScalarNodeDefinition
26 public function __construct($name, NodeParentInterface
$parent = null)
28 parent
::__construct($name, $parent);
30 $this->nullEquivalent
= true;
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();
48 * @return BooleanNode The node
50 protected function instantiateNode()
52 return new BooleanNode($this->name
, $this->parent
);