Texy\HtmlElement::href PHP Method

href() final public method

Special setter for element's attribute.
final public href ( $path, $query = NULL ) : self
return self
    public final function href($path, $query = NULL)
    {
        if ($query) {
            $query = http_build_query($query, NULL, '&');
            if ($query !== '') {
                $path .= '?' . $query;
            }
        }
        $this->attrs['href'] = $path;
        return $this;
    }