/** * Creates attributes array * * @param array $uAttributes set of the tag attributes * * @return string html output */ public static function attributes(array $uAttributes) { $tAttributes = Arrays::sortByPriority($uAttributes, self::$attributeOrder); $tReturn = []; foreach ($tAttributes as $tKey => $tValue) { if ($tValue === null) { $tReturn[] = "{$tKey}=\"{$tKey}\""; continue; } $tReturn[] = "{$tKey}=\"" . String::escapeHtml($tValue) . "\""; } return implode(" ", $tReturn); }