mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 00:37:52 +00:00
Merge pull request #396 from skipperbent/v4-development
Version 4.0.0.9
This commit is contained in:
Generated
+394
-497
File diff suppressed because it is too large
Load Diff
@@ -9,14 +9,14 @@ interface IInputItem
|
||||
|
||||
public function setIndex(string $index): self;
|
||||
|
||||
public function getName(): string;
|
||||
public function getName(): ?string;
|
||||
|
||||
public function setName(string $name): self;
|
||||
|
||||
public function getValue(): string;
|
||||
public function getValue(): ?string;
|
||||
|
||||
public function setValue(string $value): self;
|
||||
|
||||
public function __toString();
|
||||
public function __toString(): string;
|
||||
|
||||
}
|
||||
@@ -140,7 +140,7 @@ class InputFile implements IInputItem
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName(): string
|
||||
public function getName(): ?string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
@@ -177,7 +177,7 @@ class InputFile implements IInputItem
|
||||
*
|
||||
* @return string mixed
|
||||
*/
|
||||
public function getFilename(): string
|
||||
public function getFilename(): ?string
|
||||
{
|
||||
return $this->filename;
|
||||
}
|
||||
@@ -256,12 +256,12 @@ class InputFile implements IInputItem
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function __toString()
|
||||
public function __toString(): string
|
||||
{
|
||||
return $this->getTmpName();
|
||||
}
|
||||
|
||||
public function getValue(): string
|
||||
public function getValue(): ?string
|
||||
{
|
||||
return $this->getFilename();
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ class InputItem implements IInputItem
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getName(): string
|
||||
public function getName(): ?string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
@@ -55,7 +55,7 @@ class InputItem implements IInputItem
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getValue(): string
|
||||
public function getValue(): ?string
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
@@ -72,7 +72,7 @@ class InputItem implements IInputItem
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function __toString()
|
||||
public function __toString(): string
|
||||
{
|
||||
return (string)$this->value;
|
||||
}
|
||||
|
||||
+14
-2
@@ -4,7 +4,7 @@ namespace Pecee\Http;
|
||||
|
||||
use Pecee\Http\Exceptions\MalformedUrlException;
|
||||
|
||||
class Url
|
||||
class Url implements \JsonSerializable
|
||||
{
|
||||
private $originalUrl;
|
||||
|
||||
@@ -441,7 +441,19 @@ class Url
|
||||
return $scheme . $user . $pass . $host . $port . $this->getRelativeUrl();
|
||||
}
|
||||
|
||||
public function __toString()
|
||||
/**
|
||||
* Specify data which should be serialized to JSON
|
||||
* @link http://php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
* @return mixed data which can be serialized by <b>json_encode</b>,
|
||||
* which is a value of any type other than a resource.
|
||||
* @since 5.4.0
|
||||
*/
|
||||
public function jsonSerialize(): string
|
||||
{
|
||||
return $this->getRelativeUrl();
|
||||
}
|
||||
|
||||
public function __toString(): string
|
||||
{
|
||||
return $this->getRelativeUrl();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user