Bladeren bron

initial idea

Signed-off-by: Sina Kuhestani <sina@ephpic.org>
Sina Kuhestani 5 dagen geleden
commit
c4af47fe29
100 gewijzigde bestanden met toevoegingen van 1595 en 0 verwijderingen
  1. 41 0
      src/ArrayAttribute.php
  2. 59 0
      src/Attribute.php
  3. 13 0
      src/Attributes/AcceptAttribute.php
  4. 13 0
      src/Attributes/AcceptCharsetAttribute.php
  5. 15 0
      src/Attributes/AccessKeyAttribute.php
  6. 13 0
      src/Attributes/ActionAttribute.php
  7. 13 0
      src/Attributes/AltAttribute.php
  8. 13 0
      src/Attributes/AsyncAttribute.php
  9. 13 0
      src/Attributes/AutoCompleteAttribute.php
  10. 13 0
      src/Attributes/AutoFocusAttribute.php
  11. 13 0
      src/Attributes/AutoPlayAttribute.php
  12. 13 0
      src/Attributes/CharsetAttribute.php
  13. 13 0
      src/Attributes/CheckedAttribute.php
  14. 13 0
      src/Attributes/CiteAttribute.php
  15. 13 0
      src/Attributes/ClassAttribute.php
  16. 13 0
      src/Attributes/ColsAttribute.php
  17. 13 0
      src/Attributes/ColspanAttribute.php
  18. 21 0
      src/Attributes/ComponentCustomAttribute.php
  19. 13 0
      src/Attributes/ContentAttribute.php
  20. 13 0
      src/Attributes/ContentEditableAttribute.php
  21. 13 0
      src/Attributes/ControlsAttribute.php
  22. 13 0
      src/Attributes/CoordinateAttribute.php
  23. 13 0
      src/Attributes/DataAttribute.php
  24. 13 0
      src/Attributes/DateTimeAttribute.php
  25. 13 0
      src/Attributes/DefaultAttribute.php
  26. 13 0
      src/Attributes/DeferAttribute.php
  27. 24 0
      src/Attributes/DirectionAttribute.php
  28. 13 0
      src/Attributes/DirectionNameAttribute.php
  29. 13 0
      src/Attributes/DisabledAttribute.php
  30. 13 0
      src/Attributes/DownloadAttribute.php
  31. 30 0
      src/Attributes/DraggableAttribute.php
  32. 25 0
      src/Attributes/EncodeTypeAttribute.php
  33. 29 0
      src/Attributes/EnterKeyHintAttributes.php
  34. 13 0
      src/Attributes/ForAttribute.php
  35. 13 0
      src/Attributes/FormActionAttribute.php
  36. 13 0
      src/Attributes/FormAttribute.php
  37. 13 0
      src/Attributes/HeadersAttribute.php
  38. 13 0
      src/Attributes/HeightAttribute.php
  39. 13 0
      src/Attributes/HiddenAttribute.php
  40. 13 0
      src/Attributes/HighAttribute.php
  41. 13 0
      src/Attributes/HrefAttribute.php
  42. 40 0
      src/Attributes/HrefLanguageAttribute.php
  43. 13 0
      src/Attributes/HttpEquivalentAttribute.php
  44. 13 0
      src/Attributes/IdentifierAttribute.php
  45. 13 0
      src/Attributes/InertAttribute.php
  46. 30 0
      src/Attributes/InputModeAttribute.php
  47. 13 0
      src/Attributes/IsMapAttribute.php
  48. 13 0
      src/Attributes/KindAttribute.php
  49. 13 0
      src/Attributes/LabelAttribute.php
  50. 40 0
      src/Attributes/LanguageAttribute.php
  51. 13 0
      src/Attributes/ListAttribute.php
  52. 13 0
      src/Attributes/LoopAttribute.php
  53. 13 0
      src/Attributes/LowAttribute.php
  54. 13 0
      src/Attributes/MaxAttribute.php
  55. 13 0
      src/Attributes/MaxLengthAttribute.php
  56. 13 0
      src/Attributes/MediaAttribute.php
  57. 23 0
      src/Attributes/MethodAttribute.php
  58. 13 0
      src/Attributes/MinAttribute.php
  59. 13 0
      src/Attributes/MultipleAttribute.php
  60. 13 0
      src/Attributes/MutedAttribute.php
  61. 13 0
      src/Attributes/NameAttribute.php
  62. 13 0
      src/Attributes/NoValidateAttribute.php
  63. 13 0
      src/Attributes/OpenAttribute.php
  64. 13 0
      src/Attributes/OptimumAttribute.php
  65. 13 0
      src/Attributes/PatternAttribute.php
  66. 13 0
      src/Attributes/PingAttribute.php
  67. 13 0
      src/Attributes/PlaceholderAttribute.php
  68. 13 0
      src/Attributes/PopoverAttribute.php
  69. 13 0
      src/Attributes/PopoverTargetActionAttribute.php
  70. 13 0
      src/Attributes/PopoverTargetAttribute.php
  71. 13 0
      src/Attributes/PosterAttribute.php
  72. 13 0
      src/Attributes/PreloadAttribute.php
  73. 13 0
      src/Attributes/ReadOnlyAttribute.php
  74. 29 0
      src/Attributes/RefererPolicyAttribute.php
  75. 13 0
      src/Attributes/RelationAttribute.php
  76. 13 0
      src/Attributes/RequiredAttribute.php
  77. 13 0
      src/Attributes/ReversedAttribute.php
  78. 21 0
      src/Attributes/RoleCustomAttribute.php
  79. 13 0
      src/Attributes/RowsAttribute.php
  80. 13 0
      src/Attributes/RowspanAttribute.php
  81. 13 0
      src/Attributes/SandboxAttribute.php
  82. 13 0
      src/Attributes/ScopeAttribute.php
  83. 13 0
      src/Attributes/SelectedAttribute.php
  84. 26 0
      src/Attributes/ShapeAttribute.php
  85. 13 0
      src/Attributes/SizeAttribute.php
  86. 13 0
      src/Attributes/SizesAttribute.php
  87. 13 0
      src/Attributes/SourceAttribute.php
  88. 13 0
      src/Attributes/SourceDocumentAttribute.php
  89. 40 0
      src/Attributes/SourceLanguageAttribute.php
  90. 13 0
      src/Attributes/SourceUrlAttribute.php
  91. 13 0
      src/Attributes/SpanAttribute.php
  92. 13 0
      src/Attributes/SpellCheckAttribute.php
  93. 13 0
      src/Attributes/StartAttribute.php
  94. 13 0
      src/Attributes/StepAttribute.php
  95. 13 0
      src/Attributes/StyleAttribute.php
  96. 13 0
      src/Attributes/TabIndexAttribute.php
  97. 13 0
      src/Attributes/TargetAttribute.php
  98. 13 0
      src/Attributes/TitleAttribute.php
  99. 23 0
      src/Attributes/TranslateAttribute.php
  100. 13 0
      src/Attributes/TypeAttribute.php

+ 41 - 0
src/ArrayAttribute.php

@@ -0,0 +1,41 @@
+<?php
+
+namespace ePHPic\View;
+
+use \Exception;
+
+abstract class ArrayAttribute extends NonEmptyAttribute
+{
+    protected function validate($value): bool
+    {
+        if (null === $value || true === is_array($value))
+        {
+            return true;
+        }
+        return false;
+    }
+    public function __toString(): string
+    {
+        if (true === is_array($this->value))
+        {
+            if (true === array_is_list($this->value))
+            {
+                return implode(",", $this->value);
+            }
+            else
+            {
+                $result = [];
+                asort($this->value);
+                foreach ($this->value as $key => $value)
+                {
+                    $value = trim($value);
+                    $key = trim($key);
+                    $result[] = "$key: $value";
+                }
+                $string = implode('; ', $result);
+                return $string;
+            }
+        }
+        return "";
+    }
+}

+ 59 - 0
src/Attribute.php

@@ -0,0 +1,59 @@
+<?php
+
+namespace ePHPic\View;
+
+use \Exception;
+
+abstract class Attribute implements RenderableInterface
+{
+    protected mixed $value = null;
+    public function __construct(mixed $value)
+    {
+        if(false === $this->validate($this->normalize($value)))
+        {
+            throw new Exception("Invalid Attribute value");
+        }
+        $this->value = $this->normalize($value);
+    }
+    public static function fromValue(mixed $value = null): static
+    {
+        return new static($value);
+    }
+    public function render(): string
+    {
+        if(true === $this->isEmptyAttribute())
+        {
+            return $this->__tostring();
+        }
+        if (null !== $this->value && "" !== $this->value && [] !== $this->value)
+        {
+            return $this->name() ."=\"". $this->__tostring() ."\"";
+        }
+        return "";
+    }
+    public function value(mixed $value = null): mixed
+    {
+        if(null !== $this->normalize($value))
+        {
+            if(false === $this->validate($value))
+            {
+                throw new Exception("Invalid Attribute value");
+            }
+            $this->value = $value;
+        }
+        return $this->value;
+    }
+    public function clear(): void
+    {
+        $this->value = null;
+    }
+    protected function normalize(mixed $value = null): mixed
+    {
+        return $value;
+    }
+    abstract protected function validate($value): bool;
+    abstract public function __tostring(): string;
+    abstract protected function name(): string;
+    abstract protected function isEmptyAttribute(): bool;
+
+}

+ 13 - 0
src/Attributes/AcceptAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class AcceptAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "accept";
+    }
+}

+ 13 - 0
src/Attributes/AcceptCharsetAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class AcceptCharsetAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "accept-charset";
+    }
+}

+ 15 - 0
src/Attributes/AccessKeyAttribute.php

@@ -0,0 +1,15 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\OneCharacterAttribute;
+
+
+
+class AccessKeyAttribute extends OneCharacterAttribute
+{
+    protected function name(): string
+    {
+        return "accesskey";
+    }
+}

+ 13 - 0
src/Attributes/ActionAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class ActionAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "action";
+    }
+}

+ 13 - 0
src/Attributes/AltAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class AltAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "alt";
+    }
+}

+ 13 - 0
src/Attributes/AsyncAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\EmptyAttribute;
+
+class AsyncAttribute extends EmptyAttribute
+{
+    protected function name(): string
+    {
+        return "async";
+    }
+}

+ 13 - 0
src/Attributes/AutoCompleteAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\EmptyAttribute;
+
+class AutoCompleteAttribute extends EmptyAttribute
+{
+    protected function name(): string
+    {
+        return "autocomplete";
+    }
+}

+ 13 - 0
src/Attributes/AutoFocusAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\EmptyAttribute;
+
+class AutoFocusAttribute extends EmptyAttribute
+{
+    protected function name(): string
+    {
+        return "autofocus";
+    }
+}

+ 13 - 0
src/Attributes/AutoPlayAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\EmptyAttribute;
+
+class AutoPlayAttribute extends EmptyAttribute
+{
+    protected function name(): string
+    {
+        return "autoplay";
+    }
+}

+ 13 - 0
src/Attributes/CharsetAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class CharsetAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "charset";
+    }
+}

+ 13 - 0
src/Attributes/CheckedAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\EmptyAttribute;
+
+class CheckedAttribute extends EmptyAttribute
+{
+    protected function name(): string
+    {
+        return "checked";
+    }
+}

+ 13 - 0
src/Attributes/CiteAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class CiteAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "cite";
+    }
+}

+ 13 - 0
src/Attributes/ClassAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\MultiStringAttribute;
+
+class ClassAttribute extends MultiStringAttribute
+{
+    protected function name(): string
+    {
+        return "class";
+    }
+}

+ 13 - 0
src/Attributes/ColsAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\IntegerAttribute;
+
+class ColsAttribute extends IntegerAttribute
+{
+    protected function name(): string
+    {
+        return "cols";
+    }
+}

+ 13 - 0
src/Attributes/ColspanAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\IntegerAttribute;
+
+class ColspanAttribute extends IntegerAttribute
+{
+    protected function name(): string
+    {
+        return "colspan";
+    }
+}

+ 21 - 0
src/Attributes/ComponentCustomAttribute.php

@@ -0,0 +1,21 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\CustomAttribute;
+
+class ComponentCustomAttribute extends CustomAttribute
+{
+    protected function getSuffix(): string
+    {
+        return "component";
+    }
+    protected function validate($value): bool
+    {
+        return is_string($value) || is_null($value);
+    }
+    public function __toString(): string
+    {
+        return $this->value;
+    }
+}

+ 13 - 0
src/Attributes/ContentAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class ContentAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "content";
+    }
+}

+ 13 - 0
src/Attributes/ContentEditableAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\BooleanAttribute;
+
+class ContentEditableAttribute extends BooleanAttribute
+{
+    protected function name(): string
+    {
+        return "contenteditable";
+    }
+}

+ 13 - 0
src/Attributes/ControlsAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\EmptyAttribute;
+
+class ControlsAttribute extends EmptyAttribute
+{
+    protected function name(): string
+    {
+        return "controls";
+    }
+}

+ 13 - 0
src/Attributes/CoordinateAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\ArrayAttribute;
+
+class CoordinateAttribute extends ArrayAttribute
+{
+    protected function name(): string
+    {
+        return "coords";
+    }
+}

+ 13 - 0
src/Attributes/DataAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class DataAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "data";
+    }
+}

+ 13 - 0
src/Attributes/DateTimeAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class DateTimeAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "datetime";
+    }
+}

+ 13 - 0
src/Attributes/DefaultAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\EmptyAttribute;
+
+class DefaultAttribute extends EmptyAttribute
+{
+    protected function name(): string
+    {
+        return "default";
+    }
+}

+ 13 - 0
src/Attributes/DeferAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\EmptyAttribute;
+
+class DeferAttribute extends EmptyAttribute
+{
+    protected function name(): string
+    {
+        return "defer";
+    }
+}

+ 24 - 0
src/Attributes/DirectionAttribute.php

@@ -0,0 +1,24 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\EnumAttribute;
+
+class DirectionAttribute extends EnumAttribute
+{
+    protected function getValidValues(): array
+    {
+        return [
+            "rtl",
+            "ltr"
+        ];
+    }
+    public function __toString(): string
+    {
+        return (string) $this->value;
+    }
+    protected function name(): string
+    {
+        return "dir";
+    }
+}

+ 13 - 0
src/Attributes/DirectionNameAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class DirectionNameAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "dirname";
+    }
+}

+ 13 - 0
src/Attributes/DisabledAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\EmptyAttribute;
+
+class DisabledAttribute extends EmptyAttribute
+{
+    protected function name(): string
+    {
+        return "disabled";
+    }
+}

+ 13 - 0
src/Attributes/DownloadAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\EmptyAttribute;
+
+class DownloadAttribute extends EmptyAttribute
+{
+    protected function name(): string
+    {
+        return "download";
+    }
+}

+ 30 - 0
src/Attributes/DraggableAttribute.php

@@ -0,0 +1,30 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\EnumAttribute;
+
+class DraggableAttribute extends EnumAttribute
+{
+    protected function getValidValues(): array
+    {
+        return [
+            true,
+            false,
+            "auto",
+        ];
+    }
+    public function __toString(): string
+    {
+        return match ($this->value) {
+            true => 'true',
+            false => 'false',
+            'auto' => 'auto',
+            default => (string) $this->value,
+        };
+    }
+    protected function name(): string
+    {
+        return "draggable";
+    }
+}

+ 25 - 0
src/Attributes/EncodeTypeAttribute.php

@@ -0,0 +1,25 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\EnumAttribute;
+
+class EncodeTypeAttribute extends EnumAttribute
+{
+    protected function getValidValues(): array
+    {
+        return [
+            "application/x-www-form-urlencoded", 
+            "multipart/form-data",
+            "text/plain"
+        ];
+    }
+    protected function name(): string
+    {
+        return "enctype";
+    }
+    public function __toString(): string
+    {
+        return $this->value;
+    }
+}

+ 29 - 0
src/Attributes/EnterKeyHintAttributes.php

@@ -0,0 +1,29 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\EnumAttribute;
+
+class EnterKeyHintAttributes extends EnumAttribute
+{
+    protected function getValidValues(): array
+    {
+        return [
+            "done",
+            "enter",
+            "go",
+            "next",
+            "previous",
+            "search",
+            "send",
+        ];
+    }
+    public function __toString(): string
+    {
+        return (string) $this->value;
+    }
+    protected function name(): string
+    {
+        return "enterkeyhint";
+    }
+}

+ 13 - 0
src/Attributes/ForAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class ForAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "for";
+    }
+}

+ 13 - 0
src/Attributes/FormActionAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class FormActionAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "formaction";
+    }
+}

+ 13 - 0
src/Attributes/FormAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class FormAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "form";
+    }
+}

+ 13 - 0
src/Attributes/HeadersAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class HeadersAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "headers";
+    }
+}

+ 13 - 0
src/Attributes/HeightAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\IntegerAttribute;
+
+class HeightAttribute extends IntegerAttribute
+{
+    protected function name(): string
+    {
+        return "height";
+    }
+}

+ 13 - 0
src/Attributes/HiddenAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\EmptyAttribute;
+
+class HiddenAttribute extends EmptyAttribute
+{
+    protected function name(): string
+    {
+        return "hidden";
+    }
+}

+ 13 - 0
src/Attributes/HighAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\IntegerAttribute;
+
+class HighAttribute extends IntegerAttribute
+{
+    protected function name(): string
+    {
+        return "high";
+    }
+}

+ 13 - 0
src/Attributes/HrefAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class HrefAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "href";
+    }
+}

+ 40 - 0
src/Attributes/HrefLanguageAttribute.php

@@ -0,0 +1,40 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\EnumAttribute;
+
+class HrefLanguageAttribute extends EnumAttribute
+{
+    protected function getValidValues(): array
+    {
+        return [
+            "ab", "aa", "af", "ak", "sq", "am", "ar", "an", "hy", "as", "av", 
+            "ae", "ay", "az", "bm", "ba", "eu", "be", "bn", "bh", "bi", "bs", 
+            "br", "bg", "my", "ca", "ch", "ce", "ny", "zh", "zh-Hans", 
+            "zh-Hant", "cv", "kw", "co", "cr", "hr", "cs", "da", "dv", "nl", 
+            "dz", "en", "eo", "et", "ee", "fo", "fj", "fi", "fr", "ff", "gl", 
+            "gd", "gv", "ka", "de", "el", "kl", "gn", "gu", "ht", "ha", "he", 
+            "hz", "hi", "ho", "hu", "is", "io", "ig", "id", "in", "ia", "ie", 
+            "iu", "ik", "ga", "it", "ja", "jv", "kl", "kn", "kr", "ks", "kk", 
+            "km", "ki", "rw", "rn", "ky", "kv", "kg", "ko", "ku", "kj", "lo", 
+            "la", "lv", "li", "ln", "lt", "lu", "lg", "lb", "gv", "mk", "mg", 
+            "ms", "ml", "mt", "mi", "mr", "mh", "mo", "mn", "na", "nv", "ng", 
+            "nd", "ne", "no", "nb", "nn", "ii", "oc", "oj", "cu", "or", "om", 
+            "os", "pi", "ps", "fa", "pl", "pt", "pa", "qu", "rm", "ro", "ru", 
+            "se", "sm", "sg", "sa", "sr", "sh", "st", "tn", "sn", "ii", "sd", 
+            "si", "ss", "sk", "sl", "so", "nr", "es", "su", "sw", "ss", "sv", 
+            "tl", "ty", "tg", "ta", "tt", "te", "th", "bo", "ti", "to", "ts", 
+            "tr", "tk", "tw", "ug", "uk", "ur", "uz", "ve", "vi", "vo", "wa", 
+            "cy", "wo", "fy", "xh", "yi", "ji", "yo", "za", "zu"
+        ];
+    }
+    protected function name(): string
+    {
+        return "hreflang";
+    }
+    public function __toString(): string
+    {
+        return $this->value;
+    }
+}

+ 13 - 0
src/Attributes/HttpEquivalentAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class HttpEquivalentAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "http-equiv";
+    }
+}

+ 13 - 0
src/Attributes/IdentifierAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class IdentifierAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "id";
+    }
+}

+ 13 - 0
src/Attributes/InertAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\EmptyAttribute;
+
+class InertAttribute extends EmptyAttribute
+{
+    protected function name(): string
+    {
+        return "hidden";
+    }
+}

+ 30 - 0
src/Attributes/InputModeAttribute.php

@@ -0,0 +1,30 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\EnumAttribute;
+
+class InputModeAttribute extends EnumAttribute
+{
+    protected function getValidValues(): array
+    {
+        return [
+            'decimal',
+            'email',
+            'none',
+            'numeric',
+            'search',
+            'tel',
+            'text',
+            'url',
+        ];
+    }
+    protected function name(): string
+    {
+        return "inputmode";
+    }
+    public function __toString(): string
+    {
+        return $this->value;
+    }
+}

+ 13 - 0
src/Attributes/IsMapAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\EmptyAttribute;
+
+class IsMapAttribute extends EmptyAttribute
+{
+    protected function name(): string
+    {
+        return "ismap";
+    }
+}

+ 13 - 0
src/Attributes/KindAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class KindAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "kind";
+    }
+}

+ 13 - 0
src/Attributes/LabelAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class LabelAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "label";
+    }
+}

+ 40 - 0
src/Attributes/LanguageAttribute.php

@@ -0,0 +1,40 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\EnumAttribute;
+
+class LanguageAttribute extends EnumAttribute
+{
+    protected function getValidValues(): array
+    {
+        return [
+            "ab", "aa", "af", "ak", "sq", "am", "ar", "an", "hy", "as", "av", 
+            "ae", "ay", "az", "bm", "ba", "eu", "be", "bn", "bh", "bi", "bs", 
+            "br", "bg", "my", "ca", "ch", "ce", "ny", "zh", "zh-Hans", 
+            "zh-Hant", "cv", "kw", "co", "cr", "hr", "cs", "da", "dv", "nl", 
+            "dz", "en", "eo", "et", "ee", "fo", "fj", "fi", "fr", "ff", "gl", 
+            "gd", "gv", "ka", "de", "el", "kl", "gn", "gu", "ht", "ha", "he", 
+            "hz", "hi", "ho", "hu", "is", "io", "ig", "id", "in", "ia", "ie", 
+            "iu", "ik", "ga", "it", "ja", "jv", "kl", "kn", "kr", "ks", "kk", 
+            "km", "ki", "rw", "rn", "ky", "kv", "kg", "ko", "ku", "kj", "lo", 
+            "la", "lv", "li", "ln", "lt", "lu", "lg", "lb", "gv", "mk", "mg", 
+            "ms", "ml", "mt", "mi", "mr", "mh", "mo", "mn", "na", "nv", "ng", 
+            "nd", "ne", "no", "nb", "nn", "ii", "oc", "oj", "cu", "or", "om", 
+            "os", "pi", "ps", "fa", "pl", "pt", "pa", "qu", "rm", "ro", "ru", 
+            "se", "sm", "sg", "sa", "sr", "sh", "st", "tn", "sn", "ii", "sd", 
+            "si", "ss", "sk", "sl", "so", "nr", "es", "su", "sw", "ss", "sv", 
+            "tl", "ty", "tg", "ta", "tt", "te", "th", "bo", "ti", "to", "ts", 
+            "tr", "tk", "tw", "ug", "uk", "ur", "uz", "ve", "vi", "vo", "wa", 
+            "cy", "wo", "fy", "xh", "yi", "ji", "yo", "za", "zu"
+        ];
+    }
+    protected function name(): string
+    {
+        return "lang";
+    }
+    public function __toString(): string
+    {
+        return $this->value;
+    }
+}

+ 13 - 0
src/Attributes/ListAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class ListAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "list";
+    }
+}

+ 13 - 0
src/Attributes/LoopAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\EmptyAttribute;
+
+class LoopAttribute extends EmptyAttribute
+{
+    protected function name(): string
+    {
+        return "loop";
+    }
+}

+ 13 - 0
src/Attributes/LowAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\IntegerAttribute;
+
+class LowAttribute extends IntegerAttribute
+{
+    protected function name(): string
+    {
+        return "low";
+    }
+}

+ 13 - 0
src/Attributes/MaxAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class MaxAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "max";
+    }
+}

+ 13 - 0
src/Attributes/MaxLengthAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\IntegerAttribute;
+
+class MaxLengthAttribute extends IntegerAttribute
+{
+    protected function name(): string
+    {
+        return "maxlength";
+    }
+}

+ 13 - 0
src/Attributes/MediaAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class MediaAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "media";
+    }
+}

+ 23 - 0
src/Attributes/MethodAttribute.php

@@ -0,0 +1,23 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\EnumAttribute;
+
+class MethodAttribute extends EnumAttribute
+{
+    protected function getValidValues(): array
+    {
+        return [
+            "post", "get", "put", "delete"
+        ];
+    }
+    protected function name(): string
+    {
+        return "method";
+    }
+    public function __toString(): string
+    {
+        return $this->value;
+    }
+}

+ 13 - 0
src/Attributes/MinAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class MinAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "min";
+    }
+}

+ 13 - 0
src/Attributes/MultipleAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\EmptyAttribute;
+
+class MultipleAttribute extends EmptyAttribute
+{
+    protected function name(): string
+    {
+        return "multiple";
+    }
+}

+ 13 - 0
src/Attributes/MutedAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\EmptyAttribute;
+
+class MutedAttribute extends EmptyAttribute
+{
+    protected function name(): string
+    {
+        return "muted";
+    }
+}

+ 13 - 0
src/Attributes/NameAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class NameAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "name";
+    }
+}

+ 13 - 0
src/Attributes/NoValidateAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\EmptyAttribute;
+
+class NoValidateAttribute extends EmptyAttribute
+{
+    protected function name(): string
+    {
+        return "novalidate";
+    }
+}

+ 13 - 0
src/Attributes/OpenAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\EmptyAttribute;
+
+class OpenAttribute extends EmptyAttribute
+{
+    protected function name(): string
+    {
+        return "open";
+    }
+}

+ 13 - 0
src/Attributes/OptimumAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\NumericalAttribute;
+
+class OptimumAttribute extends NumericalAttribute
+{
+    protected function name(): string
+    {
+        return "optimum";
+    }
+}

+ 13 - 0
src/Attributes/PatternAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class PatternAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "pattern";
+    }
+}

+ 13 - 0
src/Attributes/PingAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class PingAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "ping";
+    }
+}

+ 13 - 0
src/Attributes/PlaceholderAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class PlaceholderAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "placeholder";
+    }
+}

+ 13 - 0
src/Attributes/PopoverAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\EmptyAttribute;
+
+class PopoverAttribute extends EmptyAttribute
+{
+    protected function name(): string
+    {
+        return "popover";
+    }
+}

+ 13 - 0
src/Attributes/PopoverTargetActionAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class PopoverTargetActionAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "poster";
+    }
+}

+ 13 - 0
src/Attributes/PopoverTargetAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class PopoverTargetAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "id";
+    }
+}

+ 13 - 0
src/Attributes/PosterAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class IdentifierAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "id";
+    }
+}

+ 13 - 0
src/Attributes/PreloadAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class PreloadAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "preload";
+    }
+}

+ 13 - 0
src/Attributes/ReadOnlyAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\EmptyAttribute;
+
+class ReadOnlyAttribute extends EmptyAttribute
+{
+    protected function name(): string
+    {
+        return "readonly";
+    }
+}

+ 29 - 0
src/Attributes/RefererPolicyAttribute.php

@@ -0,0 +1,29 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\EnumAttribute;
+
+class RefererPolicyAttribute extends EnumAttribute
+{
+    protected function getValidValues(): array
+    {
+        return [
+            "no-referrer", 
+            "no-referrer-when-downgrade", 
+            "origin", 
+            "origin-when-cross-origin", 
+            "same-origin", 
+            "strict-origin-when-cross-origin", 
+            "unsafe-url"
+        ];
+    }
+    public function __toString(): string
+    {
+        return (string) $this->value;
+    }
+    protected function name(): string
+    {
+        return " referrerpolicy";
+    }
+}

+ 13 - 0
src/Attributes/RelationAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class RelationAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "rel";
+    }
+}

+ 13 - 0
src/Attributes/RequiredAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\EmptyAttribute;
+
+class RequiredAttribute extends EmptyAttribute
+{
+    protected function name(): string
+    {
+        return "required";
+    }
+}

+ 13 - 0
src/Attributes/ReversedAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\EmptyAttribute;
+
+class ReversedAttribute extends EmptyAttribute
+{
+    protected function name(): string
+    {
+        return "reversed";
+    }
+}

+ 21 - 0
src/Attributes/RoleCustomAttribute.php

@@ -0,0 +1,21 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\CustomAttribute;
+
+class RoleCustomAttribute extends CustomAttribute
+{
+    protected function getSuffix(): string
+    {
+        return "role";
+    }
+    protected function validate($value): bool
+    {
+        return true;
+    }
+    public function __toString(): string
+    {
+        return $this->value;
+    }
+}

+ 13 - 0
src/Attributes/RowsAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\IntegerAttribute;
+
+class RowsAttribute extends IntegerAttribute
+{
+    protected function name(): string
+    {
+        return "rows";
+    }
+}

+ 13 - 0
src/Attributes/RowspanAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\IntegerAttribute;
+
+class RowspanAttribute extends IntegerAttribute
+{
+    protected function name(): string
+    {
+        return "rowspan";
+    }
+}

+ 13 - 0
src/Attributes/SandboxAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\EmptyAttribute;
+
+class SandboxAttribute extends EmptyAttribute
+{
+    protected function name(): string
+    {
+        return "sandbox";
+    }
+}

+ 13 - 0
src/Attributes/ScopeAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class ScopeAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "scope";
+    }
+}

+ 13 - 0
src/Attributes/SelectedAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\EmptyAttribute;
+
+class SelectedAttribute extends EmptyAttribute
+{
+    protected function name(): string
+    {
+        return "selected";
+    }
+}

+ 26 - 0
src/Attributes/ShapeAttribute.php

@@ -0,0 +1,26 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\EnumAttribute;
+
+class ShapeAttribute extends EnumAttribute
+{
+    protected function getValidValues(): array
+    {
+        return [
+            "rect",
+            "circle",
+            "poly",
+            "default",
+        ];
+    }
+    public function __toString(): string
+    {
+        return (string) $this->value;
+    }
+    protected function name(): string
+    {
+        return "shape";
+    }
+}

+ 13 - 0
src/Attributes/SizeAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\IntegerAttribute;
+
+class SizeAttribute extends IntegerAttribute
+{
+    protected function name(): string
+    {
+        return "size";
+    }
+}

+ 13 - 0
src/Attributes/SizesAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class SizesAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "sizes";
+    }
+}

+ 13 - 0
src/Attributes/SourceAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class SourceAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "src";
+    }
+}

+ 13 - 0
src/Attributes/SourceDocumentAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class SourceDocumentAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "srcdoc";
+    }
+}

+ 40 - 0
src/Attributes/SourceLanguageAttribute.php

@@ -0,0 +1,40 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\EnumAttribute;
+
+class SourceLanguageAttribute extends EnumAttribute
+{
+    protected function getValidValues(): array
+    {
+        return [
+            "ab", "aa", "af", "ak", "sq", "am", "ar", "an", "hy", "as", "av", 
+            "ae", "ay", "az", "bm", "ba", "eu", "be", "bn", "bh", "bi", "bs", 
+            "br", "bg", "my", "ca", "ch", "ce", "ny", "zh", "zh-Hans", 
+            "zh-Hant", "cv", "kw", "co", "cr", "hr", "cs", "da", "dv", "nl", 
+            "dz", "en", "eo", "et", "ee", "fo", "fj", "fi", "fr", "ff", "gl", 
+            "gd", "gv", "ka", "de", "el", "kl", "gn", "gu", "ht", "ha", "he", 
+            "hz", "hi", "ho", "hu", "is", "io", "ig", "id", "in", "ia", "ie", 
+            "iu", "ik", "ga", "it", "ja", "jv", "kl", "kn", "kr", "ks", "kk", 
+            "km", "ki", "rw", "rn", "ky", "kv", "kg", "ko", "ku", "kj", "lo", 
+            "la", "lv", "li", "ln", "lt", "lu", "lg", "lb", "gv", "mk", "mg", 
+            "ms", "ml", "mt", "mi", "mr", "mh", "mo", "mn", "na", "nv", "ng", 
+            "nd", "ne", "no", "nb", "nn", "ii", "oc", "oj", "cu", "or", "om", 
+            "os", "pi", "ps", "fa", "pl", "pt", "pa", "qu", "rm", "ro", "ru", 
+            "se", "sm", "sg", "sa", "sr", "sh", "st", "tn", "sn", "ii", "sd", 
+            "si", "ss", "sk", "sl", "so", "nr", "es", "su", "sw", "ss", "sv", 
+            "tl", "ty", "tg", "ta", "tt", "te", "th", "bo", "ti", "to", "ts", 
+            "tr", "tk", "tw", "ug", "uk", "ur", "uz", "ve", "vi", "vo", "wa", 
+            "cy", "wo", "fy", "xh", "yi", "ji", "yo", "za", "zu"
+        ];
+    }
+    protected function name(): string
+    {
+        return "srclang";
+    }
+    public function __toString(): string
+    {
+        return $this->value;
+    }
+}

+ 13 - 0
src/Attributes/SourceUrlAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class SourceUrlAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "source";
+    }
+}

+ 13 - 0
src/Attributes/SpanAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\IntegerAttribute;
+
+class SpanAttribute extends IntegerAttribute
+{
+    protected function name(): string
+    {
+        return "span";
+    }
+}

+ 13 - 0
src/Attributes/SpellCheckAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\BooleanAttribute;
+
+class SpellCheckAttribute extends BooleanAttribute
+{
+    protected function name(): string
+    {
+        return "spellcheck";
+    }
+}

+ 13 - 0
src/Attributes/StartAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\IntegerAttribute;
+
+class StartAttribute extends IntegerAttribute
+{
+    protected function name(): string
+    {
+        return "start";
+    }
+}

+ 13 - 0
src/Attributes/StepAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\IntegerAttribute;
+
+class StepAttribute extends IntegerAttribute
+{
+    protected function name(): string
+    {
+        return "step";
+    }
+}

+ 13 - 0
src/Attributes/StyleAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\ArrayAttribute;
+
+class StyleAttribute extends ArrayAttribute
+{
+    protected function name(): string
+    {
+        return "style";
+    }
+}

+ 13 - 0
src/Attributes/TabIndexAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\IntegerAttribute;
+
+class TabIndexAttribute extends IntegerAttribute
+{
+    protected function name(): string
+    {
+        return "tabindex";
+    }
+}

+ 13 - 0
src/Attributes/TargetAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class TargetAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "target";
+    }
+}

+ 13 - 0
src/Attributes/TitleAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class TitleAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "title";
+    }
+}

+ 23 - 0
src/Attributes/TranslateAttribute.php

@@ -0,0 +1,23 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\EnumAttribute;
+
+class TranslateAttribute extends EnumAttribute
+{
+    protected function getValidValues(): array
+    {
+        return [
+            "yes", "no"
+        ];
+    }
+    protected function name(): string
+    {
+        return "translate";
+    }
+    public function __toString(): string
+    {
+        return $this->value;
+    }
+}

+ 13 - 0
src/Attributes/TypeAttribute.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace ePHPic\View\Attributes;
+
+use ePHPic\View\StringAttribute;
+
+class TypeAttribute extends StringAttribute
+{
+    protected function name(): string
+    {
+        return "type";
+    }
+}

Some files were not shown because too many files changed in this diff