package and depencies

This commit is contained in:
RafficMohammed
2023-01-08 02:57:24 +05:30
parent d5332eb421
commit 1d54b8bc7f
4309 changed files with 193331 additions and 172289 deletions

View File

@@ -55,49 +55,39 @@ abstract class AbstractUriElement
/**
* Gets the node associated with this link.
*
* @return \DOMElement
*/
public function getNode()
public function getNode(): \DOMElement
{
return $this->node;
}
/**
* Gets the method associated with this link.
*
* @return string
*/
public function getMethod()
public function getMethod(): string
{
return $this->method ?? 'GET';
}
/**
* Gets the URI associated with this link.
*
* @return string
*/
public function getUri()
public function getUri(): string
{
return UriResolver::resolve($this->getRawUri(), $this->currentUri);
}
/**
* Returns raw URI data.
*
* @return string
*/
abstract protected function getRawUri();
abstract protected function getRawUri(): string;
/**
* Returns the canonicalized URI path (see RFC 3986, section 5.2.4).
*
* @param string $path URI path
*
* @return string
*/
protected function canonicalizePath(string $path)
protected function canonicalizePath(string $path): string
{
if ('' === $path || '/' === $path) {
return $path;