build() protected method

Assemble markup
protected build ( $node ) : string
$node string
return string
Example #1
0
 /**
  *	Assemble markup
  *	@return string
  *	@param $node array|string
  **/
 function build($node)
 {
     if (is_string($node)) {
         return parent::build($node);
     }
     $out = '';
     foreach ($node as $key => $val) {
         $out .= is_int($key) ? $this->build($val) : $this->{'_' . $key}($val);
     }
     return $out;
 }