프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$destination | string | The path where uploaded files will be moved to | |
$extensions | array | Holds array of valid file extensions |
메소드 | 설명 | |
---|---|---|
__construct ( $destination, $extensions = [] ) | Create a new instance of the uploader | |
set_destination ( $path ) | Sets the upload destination path | |
set_extensions ( $extensions ) | Sets the upload accepted extensions | |
upload ( $file, $filename = null ) : string | Upload a file |
메소드 | 설명 | |
---|---|---|
format_filename ( $filename ) : string | Strips none alphanumeric and dash characters | |
get_error_message ( $error ) : string | Translates error codes to error messages | |
get_filename ( $filename ) : string | Creates a friendly file name | |
validate ( $file ) | Validates the passed $_FILES value and extension |
public __construct ( $destination, $extensions = [] ) |
protected format_filename ( $filename ) : string | ||
리턴 | string |
protected get_error_message ( $error ) : string | ||
리턴 | string |
protected get_filename ( $filename ) : string | ||
리턴 | string |
protected string $destination | ||
리턴 | string |