Classes | |
class | Charts |
class | ContributionsCsv |
class | Csv |
class | CsvIn |
class | CsvOut |
class | ExternalScript |
class | File |
interface | FileInterface |
class | MembersCsv |
class | News |
class | |
class | PdfAdhesionForm |
class | PdfAttendanceSheet |
class | PdfContribution |
class | PdfGroups |
class | PdfMembersCards |
class | PdfMembersLabels |
class | ScheduledPaymentsCsv |
Functions | |
init (string|null $dest=null, array $extensions=null, array $mimes=null, int $maxlenght=null, int $mincropsize=null) | |
copyTo (string $dest) | |
store (array $file, bool $ajax=false) | |
buildDestPath () | |
writeOnDisk (string $tmpfile, bool $ajax) | |
getDestDir () | |
setDestDir (string $dir) | |
getFileName () | |
setFileName (string $name) | |
getBadChars () | |
getAllowedExts () | |
getAllowedMimeTypes () | |
getErrorMessageFromCode (int $code) | |
getErrorMessage (int $code) | |
getPhpErrorMessage (int $error_code) | |
Variables | |
trait | FileTrait |
string | $name |
string | $name_wo_ext |
string | $extension |
string | $dest_dir |
array | $allowed_extensions = array() |
array | $allowed_mimes = array() |
int | $maxlenght |
int | $mincropsize |
Copyright © 2003-2024 The Galette Team
This file is part of Galette (https://galette.eu).
Galette is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Galette is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Galette. If not, see http://www.gnu.org/licenses/.
|
protected |
Build destination path
Galette\IO\copyTo | ( | string | $dest | ) |
Copy existing file to new Location
string | $dest | Destination directory |
Galette\IO\getAllowedExts | ( | ) |
Returns allowed extensions
Galette\IO\getAllowedMimeTypes | ( | ) |
Return the array of allowed mime types
Galette\IO\getBadChars | ( | ) |
Returns unauthorized characters literal values quoted, comma separated values
Galette\IO\getDestDir | ( | ) |
Get destination dir
Galette\IO\getErrorMessage | ( | int | $code | ) |
Return textual error message
int | $code | The error code |
|
protected |
Return textual error message
int | $code | The error code |
FIXME: should be more descriptive
Galette\IO\getFileName | ( | ) |
Get file name
Galette\IO\getPhpErrorMessage | ( | int | $error_code | ) |
Return textual error message send by PHP after upload attempt
int | $error_code | The error code |
|
protected |
Initialization
?string | $dest File destination directory |
?array<int,string> | $extensions Array of permitted extensions |
?array<string,string> | $mimes Array of permitted mime types |
?int | $maxlenght Maximum length for each file |
?int | $mincropsize Minimum image side size required for cropping |
Galette\IO\setDestDir | ( | string | $dir | ) |
Set destination directory
string | $dir | Directory |
Galette\IO\setFileName | ( | string | $name | ) |
Set file name
string | $name | file name |
Galette\IO\store | ( | array | $file, |
bool | $ajax = false |
||
) |
Stores a file on the disk
array<string,string|int> | $file the uploaded file | |
boolean | $ajax | If the file comes from an ajax call (dnd) |
Galette\IO\writeOnDisk | ( | string | $tmpfile, |
bool | $ajax | ||
) |
Write file on disk
string | $tmpfile | Temporary file |
bool | $ajax | If the file comes from an ajax call (dnd) |
trait Galette::IO\FileTrait |
Files