mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 08:47:52 +00:00
@@ -9,13 +9,15 @@ class InputFile implements IInputItem
|
|||||||
public $filename;
|
public $filename;
|
||||||
public $size;
|
public $size;
|
||||||
public $type;
|
public $type;
|
||||||
public $error;
|
public $errors;
|
||||||
public $tmpName;
|
public $tmpName;
|
||||||
|
|
||||||
public function __construct($index)
|
public function __construct($index)
|
||||||
{
|
{
|
||||||
$this->index = $index;
|
$this->index = $index;
|
||||||
|
|
||||||
|
$this->errors = 0;
|
||||||
|
|
||||||
// Make the name human friendly, by replace _ with space
|
// Make the name human friendly, by replace _ with space
|
||||||
$this->name = ucfirst(str_replace('_', ' ', strtolower($this->index)));
|
$this->name = ucfirst(str_replace('_', ' ', strtolower($this->index)));
|
||||||
}
|
}
|
||||||
@@ -216,7 +218,7 @@ class InputFile implements IInputItem
|
|||||||
*/
|
*/
|
||||||
public function getError()
|
public function getError()
|
||||||
{
|
{
|
||||||
return $this->error;
|
return $this->errors;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -227,7 +229,7 @@ class InputFile implements IInputItem
|
|||||||
*/
|
*/
|
||||||
public function setError($error)
|
public function setError($error)
|
||||||
{
|
{
|
||||||
$this->error = (int)$error;
|
$this->errors = (int)$error;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@@ -269,7 +271,7 @@ class InputFile implements IInputItem
|
|||||||
'type' => $this->type,
|
'type' => $this->type,
|
||||||
'size' => $this->size,
|
'size' => $this->size,
|
||||||
'name' => $this->name,
|
'name' => $this->name,
|
||||||
'error' => $this->error,
|
'error' => $this->errors,
|
||||||
'filename' => $this->filename,
|
'filename' => $this->filename,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user