method append documentation in bbn\Html\Element

Add an element to the content, or a string if it's one

function($ele) { $args = \func_get_args(); foreach ( $args as $ele ){ if ( !isset($this->content) ){ if ( \is_array($ele) && isset($ele[0]) ){ $this->content = $ele; } else{ $this->content = \is_object($ele) ? [$ele] : $ele; } } else if ( \is_array($this->content) ){ if ( \is_array($ele) ){ array_merge($this->content, $ele); } else{ array_push($this->content, $ele); } } else if ( \is_string($this->content) ){ if ( \is_array($ele) ){ foreach ( $ele as $e ){ $this->content .= $e->html(); } } else{ $this->content .= \is_object($ele) ? $ele->html() : $ele; } } } return $this; }

Add an element to the content, or a string if it's one BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.