Class

Symfony\Component\DomCrawler\Link

class Link

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

Methods

__construct(DOMNode $node, string $currentUri, string $method = 'GET')

Constructor.

DOMNode getNode()

Gets the node associated with this link.

string getMethod()

Gets the method associated with this link.

string getUri()

Gets the URI associated with this link.

Details

at line 47
public __construct(DOMNode $node, string $currentUri, string $method = 'GET')

Constructor.

Parameters

DOMNode $node A \DOMNode instance
string $currentUri The URI of the page where the link is embedded (or the base href)
string $method The method to use for the link (get by default)

Exceptions

InvalidArgumentException if the node is not a link

at line 63
public DOMNode getNode()

Gets the node associated with this link.

Return Value

DOMNode A \DOMNode instance

at line 75
public string getMethod()

Gets the method associated with this link.

Return Value

string The method

at line 87
public string getUri()

Gets the URI associated with this link.

Return Value

string The URI