本文整理匯總了PHP中Symfony\Component\DomCrawler\Link::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP Link::__construct方法的具體用法?PHP Link::__construct怎麽用?PHP Link::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Symfony\Component\DomCrawler\Link
的用法示例。
在下文中一共展示了Link::__construct方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
/**
* Constructor.
*
* @param \DOMElement $node A \DOMElement instance
* @param string $currentUri The URI of the page where the form is embedded
* @param string $method The method to use for the link (if null, it defaults to the method defined by the form)
* @param string $baseHref The URI of the <base> used for relative links, but not for empty action
*
* @throws \LogicException if the node is not a button inside a form tag
*/
public function __construct(\DOMElement $node, $currentUri, $method = null, $baseHref = null)
{
parent::__construct($node, $currentUri, $method);
$this->baseHref = $baseHref;
$this->initialize();
}
示例2: __construct
/**
* Constructor.
*
* @param \DOMNode $node A \DOMNode instance
* @param string $currentUri The URI of the page where the form is embedded
* @param string $method The method to use for the link (if null, it defaults to the method defined by the form)
*
* @throws \LogicException if the node is not a button inside a form tag
*
* @api
*/
public function __construct(\DOMNode $node, $currentUri, $method = null)
{
parent::__construct($node, $currentUri, $method);
$this->initialize();
}
示例3: __construct
/**
* @param Crawler $node
* @param string $currentUri
*/
public function __construct(Crawler $node, $currentUri)
{
parent::__construct($node->getNode(0), $currentUri);
$this->type = strtolower(trim($node->attr('type')));
}
示例4: __construct
/**
* Link constructor.
*
* @param DOMElement $node
* @param string $currentUri
*/
public function __construct(DOMElement $node, $currentUri)
{
parent::__construct($node, $currentUri);
}