This commit is contained in:
2023-12-12 16:06:49 +08:00
parent 65d41ab868
commit cb20849494
2 changed files with 24 additions and 0 deletions
+12
View File
@@ -3,6 +3,7 @@ declare(strict_types=1);
namespace Kiri\Router\Constrict;
use JetBrains\PhpStorm\ArrayShape;
use Kiri\Core\Xml;
use Kiri\Router\Base\AuthorizationInterface;
use Psr\Http\Message\RequestInterface;
@@ -61,6 +62,17 @@ class ConstrictRequest extends Message implements RequestInterface, ServerReques
}
/**
* @param string $name
* @return array|null
*/
#[ArrayShape(['name' => 'string', 'type' => 'string', 'tmp_name' => 'string', 'error' => 'int', 'size' => 'int'])]
public function file(string $name): ?array
{
return $this->files[$name] ?? null;
}
/**
* @return bool
*/
+12
View File
@@ -3,6 +3,7 @@ declare(strict_types=1);
namespace Kiri\Router;
use JetBrains\PhpStorm\ArrayShape;
use Kiri\Router\Base\AuthorizationInterface;
use Kiri\Router\Base\ExceptionHandlerDispatcher;
use Psr\Http\Message\RequestInterface;
@@ -644,6 +645,17 @@ class Request implements ServerRequestInterface
}
/**
* @param string $name
* @return array|null
*/
#[ArrayShape(['name' => 'string', 'type' => 'string', 'tmp_name' => 'string', 'error' => 'int', 'size' => 'int'])]
public function file(string $name): ?array
{
return $this->__call__(__FUNCTION__, $name);
}
/**
* @return bool
*/