modifs.mineures sans commentaires

This commit is contained in:
Jephté Clain 2024-05-20 20:20:24 +04:00
parent ab6f9fa718
commit 3384b2c9e6
1 changed files with 4 additions and 4 deletions

View File

@ -44,16 +44,16 @@ class uploads {
return self::$_files; return self::$_files;
} }
static function get(string $pkey, bool $required=true): Upload { static function get(string $pkey, bool $required=true, bool $check=true): Upload {
$_files = self::_files(); $_files = self::_files();
return new Upload(cl::pget($_files, $pkey)); return new Upload(cl::pget($_files, $pkey), $required, $check);
} }
static function all(string $pkey) { static function all(string $pkey, bool $required=true, bool $check=true) {
$_files = self::_files(); $_files = self::_files();
$uploads = []; $uploads = [];
foreach (cl::pget($_files, $pkey) as $file) { foreach (cl::pget($_files, $pkey) as $file) {
$uploads[] = new Upload($file); $uploads[] = new Upload($file, $required, $check);
} }
return $uploads; return $uploads;
} }