- Worked with the files begin on the context part
This commit is contained in:
1 parent
e75d997b02
commit
0d9db0470e
4 files changed
+21
-8
No files matched your search
@@ -10,9 +10,13 @@ class FormContext implements FormContextInterface
|
||||
public string $formName;
|
||||
|
||||
public bool $formSent;
|
||||
|
||||
|
||||
public bool $formExecuted = false;
|
||||
|
||||
public array $values = [];
|
||||
|
||||
public array $files = [];
|
||||
|
||||
public array $messages = [];
|
||||
|
||||
public ServerRequestInterface $request;
|
||||
@@ -28,6 +32,8 @@ class FormContext implements FormContextInterface
|
||||
}
|
||||
|
||||
$this->values = $request->getParsedBody() ?: [];
|
||||
|
||||
$this->files = $request->getUploadedFiles() ?: [];
|
||||
}
|
||||
|
||||
public function valid() : bool
|
||||
@@ -40,7 +46,12 @@ class FormContext implements FormContextInterface
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public function executed() : bool
|
||||
{
|
||||
return $this->formExecuted;
|
||||
}
|
||||
|
||||
public function formSent() : bool
|
||||
{
|
||||
return $this->formSent;
|
||||
|
||||
Reference in new issue
Block a user