diff --git a/src/Common/UiElement.php b/src/Common/UiElement.php index a869fdc..fb4596a 100644 --- a/src/Common/UiElement.php +++ b/src/Common/UiElement.php @@ -346,7 +346,7 @@ class UiElement implements \ArrayAccess, \Iterator, \JsonSerializable { public function jsonSerialize() { return [ 'tag' => $this->tag, - 'attr' => $this->attr, + 'attr' => $this->attributes, 'childs' => $this->childs, 'options' => $this->options, ]; @@ -404,7 +404,7 @@ class UiElement implements \ArrayAccess, \Iterator, \JsonSerializable { return ! in_array(key($this->childs), [ NULL, FALSE ], true); } - public static function is_node($obj) : bool + public static function isNode($obj) : bool { return $obj instanceof UiElement; } diff --git a/src/Method/FormHandler.php b/src/Method/FormHandler.php index 64acb60..ebc1a52 100644 --- a/src/Method/FormHandler.php +++ b/src/Method/FormHandler.php @@ -34,7 +34,7 @@ class FormHandler { { if ( false !== $this->context->formSent = $this->sent ) { if ( $this->context->formName ?? false ) { - $this->context->formSent = (bool) ( $this->request->getParsedBody()['picea-ui-form'][$this->context->formName] ?? false ); + $this->sent = $this->context->formSent = (bool) ( $this->request->getParsedBody()['picea-ui-form'][$this->context->formName] ?? false ); } } }