2 Commits
3.8.5 ... 3.8.7

Author SHA1 Message Date
393f37577d json POST $variables fix 2025-12-02 18:58:04 +03:00
584285b92c fix #b61599aac9 merge 2025-11-04 12:27:54 +03:00
3 changed files with 13 additions and 4 deletions

View File

@@ -34,7 +34,7 @@ use Closure as closure,
* @param model $model An instance of the model
* @param router $router An instance of the router
*
* @mathod void __construct(?string $namespace) Constructor
* @method void __construct(?string $namespace) Constructor
* @method void __destruct() Destructor
* @method string|null start() Initialize request by environment and handle it
* @method string|null request(request $request, array $parameters = []) Handle request

View File

@@ -408,9 +408,6 @@ final class request
// Exit (false)
throw new exception_argument('Failed to validate JSON from the input buffer', status::unprocessable_content->value);
}
// Writing parameters from environment into the property
$this->parameters = $_POST ?? [];
} else if ($this->method === method::post) {
// POST method

View File

@@ -114,6 +114,18 @@ final class route
get => $this->options ?? [];
}
/**
* Parameters
*
* @see https://wiki.php.net/rfc/property-hooks (find a table about backed and virtual hooks)
*
* @var array $parameters Arguments for the $this->method (will be concatenated together with generated request parameters)
*/
public array $variables = [] {
// Read
&get => $this->variables;
}
/**
* Constructor
*