Merge branch '4.4' into 5.2
* 4.4: [DomCrawler] Backport type fixes
This commit is contained in:
commit
3804ad3fd5
@ -35,7 +35,7 @@ abstract class AbstractUriElement
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \DOMElement $node A \DOMElement instance
|
* @param \DOMElement $node A \DOMElement instance
|
||||||
* @param string $currentUri The URI of the page where the link is embedded (or the base href)
|
* @param string|null $currentUri The URI of the page where the link is embedded (or the base href)
|
||||||
* @param string|null $method The method to use for the link (GET by default)
|
* @param string|null $method The method to use for the link (GET by default)
|
||||||
*
|
*
|
||||||
* @throws \InvalidArgumentException if the node is not a link
|
* @throws \InvalidArgumentException if the node is not a link
|
||||||
|
@ -21,20 +21,29 @@ use Symfony\Component\CssSelector\CssSelectorConverter;
|
|||||||
*/
|
*/
|
||||||
class Crawler implements \Countable, \IteratorAggregate
|
class Crawler implements \Countable, \IteratorAggregate
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @var string|null
|
||||||
|
*/
|
||||||
protected $uri;
|
protected $uri;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string The default namespace prefix to be used with XPath and CSS expressions
|
* The default namespace prefix to be used with XPath and CSS expressions.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
*/
|
*/
|
||||||
private $defaultNamespacePrefix = 'default';
|
private $defaultNamespacePrefix = 'default';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array A map of manually registered namespaces
|
* A map of manually registered namespaces.
|
||||||
|
*
|
||||||
|
* @var array<string, string>
|
||||||
*/
|
*/
|
||||||
private $namespaces = [];
|
private $namespaces = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string The base href value
|
* The base href value.
|
||||||
|
*
|
||||||
|
* @var string|null
|
||||||
*/
|
*/
|
||||||
private $baseHref;
|
private $baseHref;
|
||||||
|
|
||||||
@ -75,7 +84,7 @@ class Crawler implements \Countable, \IteratorAggregate
|
|||||||
/**
|
/**
|
||||||
* Returns the current URI.
|
* Returns the current URI.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string|null
|
||||||
*/
|
*/
|
||||||
public function getUri()
|
public function getUri()
|
||||||
{
|
{
|
||||||
@ -85,7 +94,7 @@ class Crawler implements \Countable, \IteratorAggregate
|
|||||||
/**
|
/**
|
||||||
* Returns base href.
|
* Returns base href.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string|null
|
||||||
*/
|
*/
|
||||||
public function getBaseHref()
|
public function getBaseHref()
|
||||||
{
|
{
|
||||||
|
@ -38,9 +38,9 @@ class Form extends Link implements \ArrayAccess
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \DOMElement $node A \DOMElement instance
|
* @param \DOMElement $node A \DOMElement instance
|
||||||
* @param string $currentUri The URI of the page where the form is embedded
|
* @param string|null $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|null $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
|
* @param string|null $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
|
* @throws \LogicException if the node is not a button inside a form tag
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user