/*!
\static
Creates an element which represents a boolean and returns it.
970089
static function createBooleanElement( $boolean, $variablePlacement = false )
    {
        if ( !is_bool( $boolean ) )
            $boolean = (bool)$boolean;
        return array( eZTemplate::TYPE_BOOLEAN,
                      $boolean, $variablePlacement );
    }
349709
public static function Create () {
		$args = func_num_args() === 0 ? [[]] : func_get_args();
		if ((isset($args[1]) || array_key_exists(1, $args)) && $args[1] === null) {
			unset($args[1]);
		} else {
			$args[1] = \ArrayObject::STD_PROP_LIST | \ArrayObject::ARRAY_AS_PROPS;
		}

		switch (count($args)) {
			case 3:
				return new static($args[0], $args[1], $args[2]);
			case 2:
				return new static($args[0], $args[1]);
			case 1:
				return new static($args[0]);
			default:
				return new static();
		}
	}
20226
public static function __static()
	{
		// NameValue::$nameStartChar = "[:_\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nl}]";
		NameValue::$nameStartChar = SchemaTypes::$nameStartChar;
		NameValue::$nameChar = SchemaTypes::$nameChar;
		NameValue::$name = SchemaTypes::$name;
		NameValue::$ncName = SchemaTypes::$ncName;
	}
431166
public static function __static()
	{
		SequenceTypes::$Void = SequenceType::WithTypeCode( XmlTypeCode::None );
		SequenceTypes::$Item = SequenceType::WithTypeCode( XmlTypeCode::Item );
		SequenceTypes::$ItemS = SequenceType::WithTypeCodeAndCardinality( XmlTypeCode::Item, XmlTypeCardinality::ZeroOrMore );
		SequenceTypes::$Node = SequenceType::WithTypeCode( XmlTypeCode::Node );
		SequenceTypes::$ProcessingInstruction = SequenceType::WithTypeCode( XmlTypeCode::ProcessingInstruction );
		SequenceTypes::$Text = SequenceType::WithTypeCode( XmlTypeCode::Text );
		SequenceTypes::$Comment = SequenceType::WithTypeCode( XmlTypeCode::Comment );
		SequenceTypes::$Element = SequenceType::WithTypeCode( XmlTypeCode::Element );
		SequenceTypes::$Attribute = SequenceType::WithTypeCode( XmlTypeCode::Attribute );
		SequenceTypes::$Document = SequenceType::WithTypeCode( XmlTypeCode::Document );
		SequenceTypes::$Boolean = SequenceType::WithTypeCode( XmlTypeCode::Boolean );
		SequenceTypes::$AnyAtomicType = SequenceType::WithTypeCode( XmlTypeCode::AnyAtomicType );
		SequenceTypes::$AnyAtomicTypeO = SequenceType::WithTypeCodeAndCardinality( XmlTypeCode::AnyAtomicType, XmlTypeCardinality::ZeroOrOne );
		SequenceTypes::$Double = SequenceType::WithTypeCode( XmlTypeCode::Double );
		SequenceTypes::$Float = SequenceType::WithTypeCode( XmlTypeCode::Float );
		SequenceTypes::$Date = SequenceType::WithTypeCode( XmlTypeCode::Date );
		SequenceTypes::$Time = SequenceType::WithTypeCode( XmlTypeCode::Time );
		SequenceTypes::$DateTime = SequenceType::WithTypeCode( XmlTypeCode::DateTime );
		SequenceTypes::$StringX = SequenceType::WithTypeCodeAndCardinality (XmlTypeCode::String, XmlTypeCardinality::ZeroOrOne );
		SequenceTypes::$Int = SequenceType::WithTypeCode( XmlTypeCode::Int );
		SequenceTypes::$AnyUri = SequenceType::WithTypeCode( XmlTypeCode::AnyUri );
	}
259105
@Override
    public boolean getElementAsBoolean() throws XMLStreamException
    {
        ValueDecoderFactory.BooleanDecoder dec = _decoderFactory().getBooleanDecoder();
        getElementAs(dec);
        return dec.getValue();
    }
1317376
function () {
            var _this = this;
            return typeof this.value === 'boolean' ? {
                checked: this.value,
                onChange: function (e) { return _this.set(Boolean(e.target.checked)); }
            } : {
                value: this.value,
                onChange: function (e) { return _this.set(e.target.value); }
            };
        }
661690
public function rule_bool($a)
    {
        // We don't use PHP inbuilt test - a bit restrictive

        // Changes PHP true/false to 1, 0
        $a = strtolower($a);

        $vals = array('true', 'false', 't', 'f', 1, 0, 'yes', 'no', 'y', 'n');

        if (!in_array($a, $vals)) {
            return $this->fail('Must be a boolean value');
        }
    }
756175
static function staticNodeData( $node )
    {
        $nodeType = $node[0];
        if ( $nodeType == eZTemplate::NODE_TEXT )
        {
            return $node[2];
        }
        else if ( $nodeType == eZTemplate::NODE_VARIABLE )
        {
            $data = $node[2];
            if ( is_array( $data ) and
                 count( $data ) > 0 )
            {
                $dataType = $data[0][0];
                if ( $dataType == eZTemplate::TYPE_STRING or
                     $dataType == eZTemplate::TYPE_NUMERIC or
                     $dataType == eZTemplate::TYPE_IDENTIFIER or
                     $dataType == eZTemplate::TYPE_ARRAY or
                     $dataType == eZTemplate::TYPE_BOOLEAN )
                {
                    return $data[0][1];
                }
            }
        }
        return null;
    }
545035
public function boolean()
    {
        $message = ['%s is {{not|}} a boolean', $this->value];
        $this->assert(is_bool($this->value), $message);

        return $this;
    }
539974
private function createBooleanNode(\DOMDocument $document, bool $value, string $name = null): \DOMNode
    {
        $node = $document->createElement('json:boolean', $value ? 'true' : 'false');

        if (null !== $name) {
            $node->setAttribute('name', $name);
        }

        return $node;
    }
345268
public  function getBoolean( $key, bool $default_value = NULL )
    {
        $value = $this->getPropertyNodeValue( $key );

        // return default value if the element is null
        if ( NULL === $value ){
            return NULL === $default_value ? NULL : $default_value;
        }

        return boolval($value);
    }
327816
public static function create(bool $value = null, bool $allowSerializeEmpty = false): BoolNode
    {
        $node = new self();
        $node->value = $value;
        $node->allowSerializeEmpty = $allowSerializeEmpty;

        return $node;
    }
536496
public static function create()
    {
        $result = new static();
        $result->devBranches = [];
        $result->directoryToParse = '';
        $result->directoryForPlaces = '';
        $result->detectedVersions = [];
        $result->tagToVersionRegexp = '/^(?:v(?:er(?:s(?:ion)?)?)?[.\s]*)?(\d+(?:\.\d+)*)$/';
        $result->setTagFilters(null);

        return $result;
    }
954494
static function toBoolean ($v)
  {
    return is_string ($v) ? get (self::$BOOLEAN_VALUES, $v, false) : boolval ($v);
  }
408912
@XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "Boolean")
    public JAXBElement<Boolean> createBoolean(Boolean value) {
        return new JAXBElement<Boolean>(_Boolean_QNAME, Boolean.class, null, value);
    }
806305
static function __static()
	{

		DOMXPathNavigator::$nodeTypeMap = array(
			XML_ELEMENT_NODE => XPathNodeType::Element,
			XML_ATTRIBUTE_NODE => XPathNodeType::Attribute,
			XML_TEXT_NODE => XPathNodeType::Text,
			// XML_CDATA_SECTION_NODE => 4,
			// XML_ENTITY_REF_NODE => 5,
			// XML_ENTITY_NODE => 6,
			XML_PI_NODE => XPathNodeType::ProcessingInstruction,
			XML_COMMENT_NODE => XPathNodeType::Comment,
			XML_DOCUMENT_NODE => XPathNodeType::Root,
			// XML_DOCUMENT_TYPE_NODE => XPathNodeType::Element, // .NET does not consider this an element
			// XML_DOCUMENT_FRAG_NODE => 11,
			XML_NOTATION_NODE => 12,
			// XML_HTML_DOCUMENT_NODE => 13,
			// XML_DTD_NODE => 14,
			XML_ELEMENT_DECL_NODE => XPathNodeType::Element,
			XML_ATTRIBUTE_DECL_NODE => XPathNodeType::Attribute,
			// XML_ENTITY_DECL_NODE => 17,
			XML_NAMESPACE_DECL_NODE => XPathNodeType::NamespaceURI,
		);

	}
1246077
private function doWhile() {
    $node = new DoWhileNode();
    $this->mustMatch(T_DO, $node, NULL, FALSE, TRUE);
    $node->addChild($this->statement(), 'body');
    $this->mustMatch(T_WHILE, $node, 'whileKeyword');
    $this->condition($node, 'condition');
    $this->endStatement($node);
    return $node;
  }