diff --git a/library/vendor/ipl/Html/Html.php b/library/vendor/ipl/Html/Html.php
index 6b201aaf..08d31a47 100644
--- a/library/vendor/ipl/Html/Html.php
+++ b/library/vendor/ipl/Html/Html.php
@@ -153,6 +153,13 @@ class Html implements ValidHtml
return Element::create($tag, $attributes, $content);
}
+ /**
+ * @deprecated
+ * @param $name
+ * @param null $attributes
+ * @return Element
+ * @throws ProgrammingError
+ */
public static function element($name, $attributes = null)
{
// TODO: This might be anything here, add a better check
@@ -170,6 +177,38 @@ class Html implements ValidHtml
return $element;
}
+ /**
+ * @param $name
+ * @param $arguments
+ * @return BaseElement
+ */
+ public static function __callStatic($name, $arguments)
+ {
+ $attributes = array_shift($arguments);
+ $content = null;
+ if ($attributes instanceof ValidHtml || is_string($attributes)) {
+ $content = $attributes;
+ $attributes = null;
+ } elseif (is_array($attributes)) {
+ if (empty($attributes)) {
+ $attributes = null;
+ } elseif (is_int(key($attributes))) {
+ $content = $attributes;
+ $attributes = null;
+ }
+ }
+
+ if (! empty($arguments)) {
+ if (null === $content) {
+ $content = $arguments;
+ } else {
+ $content = [$content, $arguments];
+ }
+ }
+
+ return Element::create($name, $attributes, $content);
+ }
+
/**
* @param Exception|string $error
* @return string