Paaxio 1.0
Plateforme de streaming musical - SAE IUT Bayonne
Chargement...
Recherche...
Aucune correspondance
fichier.class.php
Aller à la documentation de ce fichier.
1<?php
10enum TypeFichier: string
11{
12 case Image = 'image';
13 case Audio = 'audio';
15
19enum FormatFichier: string
20{
21 case JPG = 'jpg';
22 case JPEG = 'jpeg';
23 case PNG = 'png';
24 case WEBP = 'webp';
25 case MP3 = 'mp3';
26 case WAV = 'wav';
28
29class Fichier {
33 private string|null $urlFichier;
34
39
44
48 private DateTime|null $dateAjout;
49
56 public function __construct(?string $urlFichier = null, ?TypeFichier $typeFichier = null, ?FormatFichier $formatFichier = null)
57 {
58 $this->urlFichier = $urlFichier;
59 $this->typeFichier = $typeFichier;
60 $this->formatFichier = $formatFichier;
61 $this->dateAjout = new DateTime();
62 }
63
67 public function getUrlFichier(): ?string
68 {
69 return $this->urlFichier;
70 }
75 public function setUrlFichier(?string $urlFichier): void
76 {
77 $this->urlFichier = $urlFichier;
78
79 }
80
84 public function getTypeFichier(): ?TypeFichier
85 {
86 return $this->typeFichier;
87 }
92 public function setTypeFichier(?TypeFichier $typeFichier): void
93 {
94 $this->typeFichier = $typeFichier;
95
96 }
97
101 public function getFormatFichier(): ?FormatFichier
102 {
104 }
110 {
111 $this->formatFichier = $formatFichier;
112
113 }
114
118 public function getDateAjout(): ?DateTime
119 {
120 return $this->dateAjout;
121 }
126 public function setDateAjout(?DateTime $dateAjout): void
127 {
128 $this->dateAjout = $dateAjout;
129 }
130
131}
getFormatFichier()
Get the value of formatFichier.
TypeFichier null $typeFichier
setDateAjout(?DateTime $dateAjout)
Set the value of dateAjout.
setTypeFichier(?TypeFichier $typeFichier)
Set the value of typeFichier.
getTypeFichier()
Get the value of typeFichier.
string null $urlFichier
setUrlFichier(?string $urlFichier)
Set the value of urlFichier.
setFormatFichier(?FormatFichier $formatFichier)
Set the value of formatFichier.
FormatFichier null $formatFichier
getUrlFichier()
Get the value of urlFichier.
DateTime null $dateAjout
__construct(?string $urlFichier=null, ?TypeFichier $typeFichier=null, ?FormatFichier $formatFichier=null)
Constructeur de la classe Fichier.
getDateAjout()
Get the value of dateAjout.
FormatFichier
Énumération des formats de fichiers supportés.
@ WAV
TypeFichier
Énumération des types de fichiers supportés.
@ Audio