/** * 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(); }
/** * 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(); }
/** * @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'))); }
/** * Link constructor. * * @param DOMElement $node * @param string $currentUri */ public function __construct(DOMElement $node, $currentUri) { parent::__construct($node, $currentUri); }