src/Services/NestableService.php
protected function renderAttr($attributes = false, $params = false)
    {
        $attrStr = '';

        if (isset($attributes['callback'])) {
            $callbackParams = [$this];

            if ($params !== false) {
                array_push($callbackParams, $params);
            }

            call_user_func_array($attributes['callback'], $callbackParams);
        }

        if (is_array($attributes)) {
            foreach ($attributes as $attr => $value) {
                if (is_string($value)) {
                    $attrStr .= ' '.$attr.'="'.$value.'"';
                }
            }
        }

        return $attrStr;
    }
protected function renderAttr($attributes = false, $params = false)
    {
        $attrStr = '';

        if (isset($attributes['callback'])) {
            $callbackParams = [$this];

            if ($params !== false) {
                array_push($callbackParams, $params);
            }

            call_user_func_array($attributes['callback'], $callbackParams);
        }

        if (is_array($attributes)) {
            foreach ($attributes as $attr => $value) {
                if (is_string($value)) {
                    $attrStr .= ' '.$attr.'="'.$value.'"';
                }
            }
        }

        return $attrStr;
    }
protected function renderAttr ( $ attributes = false , $ params = false ) { $ attrStr = '' ; if ( isset ( $ attributes [ 'callback' ] ) ) { $ callbackParams = [ $ this ] ; if ( $ params !== false ) { array_push ( $ callbackParams , $ params ) ; } call_user_func_array ( $ attributes [ 'callback' ] , $ callbackParams ) ; } if ( is_array ( $ attributes ) ) { foreach ( $ attributes as $ attr => $ value ) { if ( is_string ( $ value ) ) { $ attrStr .= ' ' . $ attr . '="' . $ value . '"' ; } } } return $ attrStr ; }
Render the attritues of html elements.

@param mixed $attributes
@param mixed $params

@return string
Render the attritues of html elements .