protected static function getBitfield(DOMElement $element, $name)
	{
		$props    = self::getProperties($element);
		$bitfield = self::toBin($props[$name]);

		// For each bit set to 1, test whether there is an XPath condition to it and whether it is
		// fulfilled. If not, turn the bit to 0
		foreach (array_keys(array_filter(str_split($bitfield, 1))) as $bitNumber)
		{
			$conditionName = $name . $bitNumber;
			if (isset($props[$conditionName]) && !self::evaluate($props[$conditionName], $element))
			{
				$bitfield[$bitNumber] = '0';
			}
		}

		return self::toRaw($bitfield);
	}
protected static function getBitfield(DOMElement $element, $name)
	{
		$props    = self::getProperties($element);
		$bitfield = self::toBin($props[$name]);

		// For each bit set to 1, test whether there is an XPath condition to it and whether it is
		// fulfilled. If not, turn the bit to 0
		foreach (array_keys(array_filter(str_split($bitfield, 1))) as $bitNumber)
		{
			$conditionName = $name . $bitNumber;
			if (isset($props[$conditionName]) && !self::evaluate($props[$conditionName], $element))
			{
				$bitfield[$bitNumber] = '0';
			}
		}

		return self::toRaw($bitfield);
	}
protected static function getBitfield ( DOMElement $ element , $ name ) { $ props = self :: getProperties ( $ element ) ; $ bitfield = self :: toBin ( $ props [ $ name ] ) ; // For each bit set to 1, test whether there is an XPath condition to it and whether it is // fulfilled. If not, turn the bit to 0 foreach ( array_keys ( array_filter ( str_split ( $ bitfield , 1 ) ) ) as $ bitNumber ) { $ conditionName = $ name . $ bitNumber ; if ( isset ( $ props [ $ conditionName ] ) && ! self :: evaluate ( $ props [ $ conditionName ] , $ element ) ) { $ bitfield [ $ bitNumber ] = '0' ; } } return self :: toRaw ( $ bitfield ) ; }
Get the bitfield value for a given element

@param  DOMElement $element Context node
@param  string     $name    Bitfield name: either 'c', 'ac' or 'dd'
@return string
Get the bitfield value for a given element