protected static function common_check(&$attributes, $include_method = true)
    {
        if (!empty($attributes['args'])) {
            $attributes['data-phery-args'] = json_encode($attributes['args']);
            unset($attributes['args']);
        }

        if (!empty($attributes['confirm'])) {
            $attributes['data-phery-confirm'] = $attributes['confirm'];
            unset($attributes['confirm']);
        }

        if (!empty($attributes['cache'])) {
            $attributes['data-phery-cache'] = "1";
            unset($attributes['cache']);
        }

        if (!empty($attributes['target'])) {
            $attributes['data-phery-target'] = $attributes['target'];
            unset($attributes['target']);
        }

        if (!empty($attributes['related'])) {
            $attributes['data-phery-related'] = $attributes['related'];
            unset($attributes['related']);
        }

        if (!empty($attributes['phery-type'])) {
            $attributes['data-phery-type'] = $attributes['phery-type'];
            unset($attributes['phery-type']);
        }

        if (!empty($attributes['only'])) {
            $attributes['data-phery-only'] = $attributes['only'];
            unset($attributes['only']);
        }

        if (isset($attributes['clickable'])) {
            $attributes['data-phery-clickable'] = "1";
            unset($attributes['clickable']);
        }

        if ($include_method) {
            if (isset($attributes['method'])) {
                $attributes['data-phery-method'] = $attributes['method'];
                unset($attributes['method']);
            }
        }

        $encoding = 'UTF-8';
        if (isset($attributes['encoding'])) {
            $encoding = $attributes['encoding'];
            unset($attributes['encoding']);
        }

        return $encoding;
    }
protected static function common_check(&$attributes, $include_method = true)
    {
        if (!empty($attributes['args'])) {
            $attributes['data-phery-args'] = json_encode($attributes['args']);
            unset($attributes['args']);
        }

        if (!empty($attributes['confirm'])) {
            $attributes['data-phery-confirm'] = $attributes['confirm'];
            unset($attributes['confirm']);
        }

        if (!empty($attributes['cache'])) {
            $attributes['data-phery-cache'] = "1";
            unset($attributes['cache']);
        }

        if (!empty($attributes['target'])) {
            $attributes['data-phery-target'] = $attributes['target'];
            unset($attributes['target']);
        }

        if (!empty($attributes['related'])) {
            $attributes['data-phery-related'] = $attributes['related'];
            unset($attributes['related']);
        }

        if (!empty($attributes['phery-type'])) {
            $attributes['data-phery-type'] = $attributes['phery-type'];
            unset($attributes['phery-type']);
        }

        if (!empty($attributes['only'])) {
            $attributes['data-phery-only'] = $attributes['only'];
            unset($attributes['only']);
        }

        if (isset($attributes['clickable'])) {
            $attributes['data-phery-clickable'] = "1";
            unset($attributes['clickable']);
        }

        if ($include_method) {
            if (isset($attributes['method'])) {
                $attributes['data-phery-method'] = $attributes['method'];
                unset($attributes['method']);
            }
        }

        $encoding = 'UTF-8';
        if (isset($attributes['encoding'])) {
            $encoding = $attributes['encoding'];
            unset($attributes['encoding']);
        }

        return $encoding;
    }
protected static function common_check ( & $ attributes , $ include_method = true ) { if ( ! empty ( $ attributes [ 'args' ] ) ) { $ attributes [ 'data-phery-args' ] = json_encode ( $ attributes [ 'args' ] ) ; unset ( $ attributes [ 'args' ] ) ; } if ( ! empty ( $ attributes [ 'confirm' ] ) ) { $ attributes [ 'data-phery-confirm' ] = $ attributes [ 'confirm' ] ; unset ( $ attributes [ 'confirm' ] ) ; } if ( ! empty ( $ attributes [ 'cache' ] ) ) { $ attributes [ 'data-phery-cache' ] = "1" ; unset ( $ attributes [ 'cache' ] ) ; } if ( ! empty ( $ attributes [ 'target' ] ) ) { $ attributes [ 'data-phery-target' ] = $ attributes [ 'target' ] ; unset ( $ attributes [ 'target' ] ) ; } if ( ! empty ( $ attributes [ 'related' ] ) ) { $ attributes [ 'data-phery-related' ] = $ attributes [ 'related' ] ; unset ( $ attributes [ 'related' ] ) ; } if ( ! empty ( $ attributes [ 'phery-type' ] ) ) { $ attributes [ 'data-phery-type' ] = $ attributes [ 'phery-type' ] ; unset ( $ attributes [ 'phery-type' ] ) ; } if ( ! empty ( $ attributes [ 'only' ] ) ) { $ attributes [ 'data-phery-only' ] = $ attributes [ 'only' ] ; unset ( $ attributes [ 'only' ] ) ; } if ( isset ( $ attributes [ 'clickable' ] ) ) { $ attributes [ 'data-phery-clickable' ] = "1" ; unset ( $ attributes [ 'clickable' ] ) ; } if ( $ include_method ) { if ( isset ( $ attributes [ 'method' ] ) ) { $ attributes [ 'data-phery-method' ] = $ attributes [ 'method' ] ; unset ( $ attributes [ 'method' ] ) ; } } $ encoding = 'UTF-8' ; if ( isset ( $ attributes [ 'encoding' ] ) ) { $ encoding = $ attributes [ 'encoding' ] ; unset ( $ attributes [ 'encoding' ] ) ; } return $ encoding ; }
Common check for all static factories

@param array $attributes
@param bool $include_method

@return string
Common check for all static factories