Returns all attributes� name and value as a String array.

@return string array with all attributes� name and value.
5231
public String[] toStringArray() {
        String key;
        String attrs[] = new String[hashAttributes.size() * 2];
        String[] keys = hashAttributes.keySet().toArray(new String[0]);
        for (int x = 0; x < keys.length; x++) {
            attrs[(x * 2)] = keys[x];
            attrs[(x * 2) + 1] = "" + hashAttributes.get(keys[x]);
        }
        return attrs;
    }
740867
public String [] getAttributes() {
		if(attributes == null || attributes.length != 1 || !attributes[0].equals(ALL_ATTRIBUTES)) {
			boolean found = false;
			if(attributes != null) {
				for(String attribute : attributes) {
					if(attribute.equals("distinguishedName")) {
						found = true;
						break;
					}
				}
			}
			if(!found) {
				String [] attributesx = new String[attributes != null ? (attributes.length + 1) : 1];
				if(attributes != null) {
					attributesx[0] = "distinguishedName";
					for(int i = 0; i < attributes.length; ++i) {
						attributesx[i+1] = attributes[i];
					}
				}
				attributes = attributesx;
			}
		}
		return attributes;
	}
882787
public String attributes()
    {
        if (attributes==null && attributeMap==null)
            return noAttributes;

        StringBuffer buf = new StringBuffer(128);
        synchronized(buf)
        {
            if (attributeMap!=null)
            {
                Enumeration e = attributeMap.keys();
                while (e.hasMoreElements())
                {
                    buf.append(' ');
                    String a = (String)e.nextElement();
                    buf.append(a);
                    buf.append('=');
                    buf.append(attributeMap.get(a).toString());
                }
            }
            
            if(attributes!=null && attributes.length()>0)
            {
                if (!attributes.startsWith(" "))
                    buf.append(' ');
                buf.append(attributes);
            }
        }

        return buf.toString();
    }
899965
public function toArray()
    {
        $attributesToArray = [];
        foreach ($this->attributesToArray() as $attr => $value) {
            if (!starts_with($attr, '__i18n__')) {
                $attributesToArray[$attr] = $value;
            }
        }

        return array_merge($attributesToArray, $this->relationsToArray());
    }
1341287
public function getAllAttributes()
    {
        if ($this->node->hasAttributes()) {
            $attributes = [];
            foreach ($this->node->attributes as $attr) {
                $attributes[$attr->name] = $attr->value;
            }

            return $attributes;
        }

        return null;
    }
900729
public function getAttributes(): array
    {
        $attributes = $this->tag->getAttributes();
        foreach ($attributes as $name => $info) {
            $attributes[$name] = $info['value'];
        }

        return $attributes;
    }
787900
public List<String> listAttributeValues() {
        List<String> list = new ArrayList<String>();
        Collection<String> names = listAttributeNames();
        for (String name : names) {
            try {
                Object val = this.getProperty(name);
                if (val != null) {
                    list.add(name + " : " + val.toString());
                }
            } catch (Exception e) {
                throwException("Could not list attribute values. Reason: ", e);
            }
        }
        return list;
    }
788014
public function attributes()
	{
		if (!is_array($this->attrs)) {
			return '';
		}

		$s = '';
		$attrs = $this->attrs;

		foreach ($attrs as $key => $value) {
			if ($value === NULL || $value === FALSE) {
				continue;

			} elseif ($value === TRUE) {
				if (static::$xhtml) {
					$s .= ' ' . $key . '="' . $key . '"';
				} else {
					$s .= ' ' . $key;
				}
				continue;

			} elseif (is_array($value)) {
				if (strncmp($key, 'data-', 5) === 0) {
					$value = json_encode($value);

				} else {
					$tmp = NULL;
					foreach ($value as $k => $v) {
						if ($v != NULL) { // intentionally ==, skip NULLs & empty string
							//  composite 'style' vs. 'others'
							$tmp[] = $v === TRUE ? $k : (is_string($k) ? $k . ':' . $v : $v);
						}
					}
					if ($tmp === NULL) {
						continue;
					}

					$value = implode($key === 'style' || !strncmp($key, 'on', 2) ? ';' : ' ', $tmp);
				}

			} elseif (is_float($value)) {
				$value = rtrim(rtrim(number_format($value, 10, '.', ''), '0'), '.');

			} else {
				$value = (string)$value;
			}

			$q = strpos($value, '"') === FALSE ? '"' : "'";
			$s .= ' ' . $key . '=' . $q
				. str_replace(
					['&', $q, '<'],
					['&amp;', $q === '"' ? '&quot;' : '&#39;', self::$xhtml ? '&lt;' : '<'],
					$value
				)
				. (strpos($value, '`') !== FALSE && strpbrk($value, ' <>"\'') === FALSE ? ' ' : '')
				. $q;
		}

		$s = str_replace('@', '&#64;', $s);

		return $s;
	}
305920
public String asString()
    {
        TreeMap<Tag, Value> orderedAttributes = new TreeMap<Tag, Value>(attributes);
        StringBuilder result = new StringBuilder();
        for (Iterator<Map.Entry<Tag, Value>> entries = orderedAttributes.entrySet().iterator(); entries.hasNext(); )
        {
            Map.Entry<Tag, Value> mapEntry = entries.next();
            Tag tag = mapEntry.getKey();
            Value value = mapEntry.getValue();
            if (value.isPresenceType())
            {
                result.append(tag.tag);
            }
            else
            {
                result.append("(").append(tag.tag).append("=");
                if (value.multiValued)
                {
                    Object[] values = value.getValues();
                    for (int i = 0; i < values.length; ++i)
                    {
                        if (i > 0) result.append(",");
                        if (value.isOpaqueType())
                            result.append(bytesToOpaque((byte[])values[i]));
                        else
                            result.append(escapeValue(String.valueOf(values[i])));
                    }
                }
                else
                {
                    if (value.isOpaqueType())
                        result.append(bytesToOpaque((byte[])value.getValue()));
                    else
                        result.append(escapeValue(String.valueOf(value.getValue())));
                }
                result.append(")");
            }
            if (entries.hasNext()) result.append(",");
        }
        return result.toString();
    }
896238
public function toArray() {
        return array_map(function($value) {
            return ($value instanceof Arrayable) ? $value->toArray() : $value;
        }, $this->_attributes);
    }
252819
public Enumeration<String> getAttributeNames() {
		Vector<String> names = new Vector<String>(this.getAttributeMap().keySet());
		return names.elements();
	}
512697
public List<String> getAttributesNames() {
        SimpleFeatureType featureType = feature.getFeatureType();
        List<AttributeDescriptor> attributeDescriptors = featureType.getAttributeDescriptors();

        List<String> attributeNames = new ArrayList<String>();
        for( AttributeDescriptor attributeDescriptor : attributeDescriptors ) {
            String name = attributeDescriptor.getLocalName();
            attributeNames.add(name);
        }
        return attributeNames;
    }
600427
protected Map<String, String> getElementAttributes() {
        // Preserve order of attributes
        Map<String, String> attrs = new HashMap<>();

        if (this.getName() != null) {
            attrs.put("name", this.getName());
        }
        if (this.getValue() != null) {
            attrs.put("value", this.getValue());
        }

        return attrs;
    }
701412
public String[] getAttributesAsString(List<?> attributes) {

        Iterator<?> i = attributes.iterator();
        StringBuffer res1 = new StringBuffer(512);
        StringBuffer res2 = new StringBuffer(512);
        while (i.hasNext()) {
            CmsAttributeComparison compare = (CmsAttributeComparison)i.next();
            res1.append(key(compare.getName())).append(": ").append(compare.getVersion1()).append("\n");
            res2.append(key(compare.getName())).append(": ").append(compare.getVersion2()).append("\n");
        }
        return new String[] {res1.toString(), res2.toString()};
    }
1254714
public String [] getNames() {
		String [] result = new String[parameters.size()];
		parameters.keySet().toArray(result);
		return result;
	}
174845
public String[] _getAttrNames() {
		Set<String> attrNameSet = attrs.keySet();
		return attrNameSet.toArray(new String[attrNameSet.size()]);
	}
406859
public function getAttributeLabels()
    {
        $labels = [];
        foreach ($this->getAttributes() as $attribute => $value) {
            $labels[$attribute] = $this->getAttributeLabel($attribute);
        }
        return $labels;
    }