Authenticacion
This commit is contained in:
@ -11,7 +11,7 @@ abstract class Controller implements ControllerInterface {
|
||||
->withHeader('Content-Type', 'application/json')
|
||||
->withStatus(201);
|
||||
}
|
||||
public function withRedirect(string $uri): Response {
|
||||
public function withRedirect(Response $response, string $uri): Response {
|
||||
return $response
|
||||
->withHeader('Location', $uri)
|
||||
->withStatus(303);
|
||||
|
@ -30,9 +30,12 @@ class Filemanager {
|
||||
public function folder(string $name) {
|
||||
return new Filemanager($this->filesystem, $this->folders[$name]);
|
||||
}
|
||||
public function exists(string $filename) {
|
||||
return $this->filesystem->exists($this->fullPath($filename));
|
||||
}
|
||||
public function load(string $filename) {
|
||||
$filename = $this->fullPath($filename);
|
||||
if (!$this->filesystem->exists($filename)) {
|
||||
if (!$this->exists($filename)) {
|
||||
return false;
|
||||
}
|
||||
$file = new \SplFileInfo($filename);
|
||||
|
Reference in New Issue
Block a user