public static function link_to($content, $function, array $attributes = array(), Phery $phery = null, $no_close = false)
    {
        if ($phery && !isset($phery->functions[$function])) {
            self::exception($phery, 'The function "' . $function . '" provided in "link_to" hasnt been set', self::ERROR_TO);
        }

        $tag = 'a';
        if (isset($attributes['tag'])) {
            $tag = $attributes['tag'];
            unset($attributes['tag']);
        }

        $encoding = self::common_check($attributes);

        if ($function) {
            $attributes['data-phery-remote'] = $function;
        }

        $ret = array();
        $ret[] = "<{$tag}";
        foreach ($attributes as $attribute => $value) {
            $ret[] = "{$attribute}=\"" . htmlentities($value, ENT_COMPAT, $encoding, false) . "\"";
        }

        if (!in_array(strtolower($tag), array('img', 'input', 'iframe', 'hr', 'area', 'embed', 'keygen'))) {
            $ret[] = ">{$content}";
            if (!$no_close) {
                $ret[] = "</{$tag}>";
            }
        } else {
            $ret[] = "/>";
        }

        return join(' ', $ret);
    }