src/SimpleDOM.php
public function getBooleanAttribute($strName, $blnDefault = false)
    {
        $strValue = $this->getAttribute($strName, $blnDefault ? 'true' : 'false');
        if (!in_array($strValue, array('true', 'false'))) {
            throw new Exception(
                'Boolean attribute illegal value: "' . $strValue . '" valid values are "true" or "false"'
            );
        } else {
            return (($strValue == 'true') ? true : false);
        }
    }
public function getBooleanAttribute($strName, $blnDefault = false)
    {
        $strValue = $this->getAttribute($strName, $blnDefault ? 'true' : 'false');
        if (!in_array($strValue, array('true', 'false'))) {
            throw new Exception(
                'Boolean attribute illegal value: "' . $strValue . '" valid values are "true" or "false"'
            );
        } else {
            return (($strValue == 'true') ? true : false);
        }
    }
Get a boolean attribute value (value must either be 'true' or 'false')
@param $strName
@param bool $blnDefault
@throws Exception
@return bool