Skip to content

Commit 0070020

Browse files
committed
Add static methods for creating new elements"
1 parent 65cb45d commit 0070020

File tree

1 file changed

+65
-1
lines changed

1 file changed

+65
-1
lines changed

src/Html.php

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
* @method static p(...$arguments)
1515
* @method static img(...$arguments)
1616
* @method static span(...$arguments)
17-
* @method static val(...$arguments)
1817
* @method static ul(...$arguments)
1918
* @method static table(...$arguments)
2019
* @method static tbody(...$arguments)
@@ -1071,6 +1070,71 @@ public function __call($tag, $arguments): Html
10711070
return call_user_func_array([$this, 'addElement'], $arguments);
10721071
}
10731072

1073+
public static function a(...$arguments)
1074+
{
1075+
return self::createElement(...$arguments);
1076+
}
1077+
1078+
public static function button(...$arguments)
1079+
{
1080+
return self::createElement(...$arguments);
1081+
}
1082+
1083+
public static function div(...$arguments)
1084+
{
1085+
return self::createElement(...$arguments);
1086+
}
1087+
1088+
public static function input(...$arguments)
1089+
{
1090+
return self::createElement(...$arguments);
1091+
}
1092+
1093+
public static function li(...$arguments)
1094+
{
1095+
return self::createElement(...$arguments);
1096+
}
1097+
1098+
public static function p(...$arguments)
1099+
{
1100+
return self::createElement(...$arguments);
1101+
}
1102+
1103+
public static function img(...$arguments)
1104+
{
1105+
return self::createElement(...$arguments);
1106+
}
1107+
1108+
public static function span(...$arguments)
1109+
{
1110+
return self::createElement(...$arguments);
1111+
}
1112+
1113+
public static function ul(...$arguments)
1114+
{
1115+
return self::createElement(...$arguments);
1116+
}
1117+
1118+
public static function table(...$arguments)
1119+
{
1120+
return self::createElement(...$arguments);
1121+
}
1122+
1123+
public static function tbody(...$arguments)
1124+
{
1125+
return self::createElement(...$arguments);
1126+
}
1127+
1128+
public static function td(...$arguments)
1129+
{
1130+
return self::createElement(...$arguments);
1131+
}
1132+
1133+
public static function tr(...$arguments)
1134+
{
1135+
return self::createElement(...$arguments);
1136+
}
1137+
10741138
/**
10751139
* Create a new element.
10761140
*

0 commit comments

Comments
 (0)