Documentation

Link extends AbstractUriElement
in package

Link represents an HTML link (an HTML a, area or link tag).

Tags
author

Fabien Potencier fabien@symfony.com

Table of Contents

$currentUri  : string
$method  : string|null
$node  : DOMElement
__construct()  : mixed
getMethod()  : string
Gets the method associated with this link.
getNode()  : DOMElement
Gets the node associated with this link.
getUri()  : string
Gets the URI associated with this link.
canonicalizePath()  : string
Returns the canonicalized URI path (see RFC 3986, section 5.2.4).
getRawUri()  : string
Returns raw URI data.
setNode()  : mixed
Sets current \DOMElement instance.

Properties

$currentUri

protected string $currentUri

The URI of the page where the element is embedded (or the base href)

Methods

__construct()

public __construct(DOMElement $node[, string|null $currentUri = null ][, string|null $method = 'GET' ]) : mixed
Parameters
$node : DOMElement

A \DOMElement instance

$currentUri : string|null = null

The URI of the page where the link is embedded (or the base href)

$method : string|null = 'GET'

The method to use for the link (GET by default)

Tags
throws
InvalidArgumentException

if the node is not a link

Return values
mixed

getMethod()

Gets the method associated with this link.

public getMethod() : string
Return values
string

The method

getNode()

Gets the node associated with this link.

public getNode() : DOMElement
Return values
DOMElement

A \DOMElement instance

getUri()

Gets the URI associated with this link.

public getUri() : string
Return values
string

The URI

canonicalizePath()

Returns the canonicalized URI path (see RFC 3986, section 5.2.4).

protected canonicalizePath(string $path) : string
Parameters
$path : string

URI path

Return values
string

getRawUri()

Returns raw URI data.

protected getRawUri() : string
Return values
string

setNode()

Sets current \DOMElement instance.

protected setNode(DOMElement $node) : mixed
Parameters
$node : DOMElement

A \DOMElement instance

Return values
mixed

Search results