protected function _buildAttr($key, $val)
    {
        $return = null;
        if (!empty($val) || $val === '0' || $key === 'value') {
            $return = ' ' . $key . '="' . $val . '"';
        }

        return $return;
    }
protected function _buildAttr($key, $val)
    {
        $return = null;
        if (!empty($val) || $val === '0' || $key === 'value') {
            $return = ' ' . $key . '="' . $val . '"';
        }

        return $return;
    }
protected function _buildAttr ( $ key , $ val ) { $ return = null ; if ( ! empty ( $ val ) || $ val === '0' || $ key === 'value' ) { $ return = ' ' . $ key . '="' . $ val . '"' ; } return $ return ; }
Build attribute.

@param string $key
@param string $val
@return null|string
Build attribute .