/** * 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 When node type is incorrect */ public function __construct(\DOMElement $node, $currentUri, $method = null, $baseHref = null) { parent::__construct($node, $currentUri); $method = $method ?: $this->getAttribute('method', 'GET'); $this->method = strtoupper($method); $this->baseHref = $baseHref; $this->initialize(); }