Link

Link

class Link extends AbstractUriElement

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

Methods

__construct(DOMElement $node, string $currentUri, string $method = 'GET') from AbstractUriElement
DOMElement getNode()

Gets the node associated with this link.

from AbstractUriElement
string getMethod()

Gets the method associated with this link.

from AbstractUriElement
string getUri()

Gets the URI associated with this link.

from AbstractUriElement

Details

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

Parameters

DOMElement $node A \DOMElement 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

DOMElement getNode()

Gets the node associated with this link.

Return Value

DOMElement A \DOMElement instance

string getMethod()

Gets the method associated with this link.

Return Value

string The method

string getUri()

Gets the URI associated with this link.

Return Value

string The URI

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.3/Symfony/Component/DomCrawler/Link.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部