|
Paaxio 1.0
Plateforme de streaming musical - SAE IUT Bayonne
|
Fonctions membres publiques | |
| __construct (?PDO $pdo=null) | |
| Constructeur de la classe ChansonDAO. | |
| findAll () | |
| Récupère toutes les chansons de la base de données. | |
| findId (int $id) | |
| findTrending (int $limit=8, int $daysAgo=7) | |
| findAllFromUser (?string $email=null) | |
| hydrate (array $tableaAssoc) | |
| hydrateMany (array $tableauxAssoc) | |
| rechercherParTitre (string $titre) | |
| rechercherParAlbum (int $idAlbum) | |
| filtrerChanson (?int $idGenre=null, ?int $idAlbum=null, string $colonne='titreChanson', string $ordre='ASC') | |
| createChanson (Chanson $chanson) | |
| findByTitreExact (string $titre, int $idAlbum) | |
| updateChanson (Chanson $chanson) | |
| deleteChanson (int $idChanson) | |
| Supprime une chanson en base de données par son ID. | |
| incrementNbEcoute (int $idChanson) | |
| Incrémente le compteur d'écoutes d'une chanson de 1 et retourne la nouvelle valeur. | |
| findChansonsLikees (string $email) | |
| Récupère les chansons likées par un utilisateur. | |
| addChansonLikee (string $emailUtilisateur, int $idChanson) | |
| Ajoute un like pour une chanson (user + chanson) | |
| updateChansonLikee (string $emailUtilisateur, int $idChanson) | |
| Met à jour un like (change la date) | |
| toggleLike (string $emailUtilisateur, int $idChanson) | |
| Bascule le like d'une chanson (ajoute ou supprime) | |
| getPdo () | |
| Get the value of pdo. | |
| setPdo ($pdo) | |
| Set the value of pdo. | |
| getTotalEcoutesByArtiste (string $emailArtiste) | |
| Calcule le nombre total d'écoutes pour toutes les chansons d'un artiste. | |
Attributs privés | |
| PDO | $pdo |
Définition à la ligne 8 du fichier chanson.dao.php.
| ChansonDAO::__construct | ( | ?PDO | $pdo = null | ) |
Constructeur de la classe ChansonDAO.
| PDO | null | $pdo | L'instance PDO pour la connexion à la base de données. |
Définition à la ligne 19 du fichier chanson.dao.php.
Références $pdo.
| ChansonDAO::addChansonLikee | ( | string | $emailUtilisateur, |
| int | $idChanson | ||
| ) |
Ajoute un like pour une chanson (user + chanson)
Définition à la ligne 322 du fichier chanson.dao.php.
Référencé par toggleLike().
| ChansonDAO::createChanson | ( | Chanson | $chanson | ) |
Définition à la ligne 214 du fichier chanson.dao.php.
Références Chanson\getAlbumChanson(), Chanson\getDateTeleversementChanson(), Chanson\getDureeChanson(), Chanson\getEmailPublicateur(), Chanson\getGenreChanson(), Chanson\getNbEcouteChanson(), et Chanson\getTitreChanson().
| ChansonDAO::deleteChanson | ( | int | $idChanson | ) |
Supprime une chanson en base de données par son ID.
| int | $idChanson |
Définition à la ligne 266 du fichier chanson.dao.php.
| ChansonDAO::filtrerChanson | ( | ?int | $idGenre = null, |
| ?int | $idAlbum = null, |
||
| string | $colonne = 'titreChanson', |
||
| string | $ordre = 'ASC' |
||
| ) |
Définition à la ligne 179 du fichier chanson.dao.php.
Références hydrateMany().
| ChansonDAO::findAll | ( | ) |
Récupère toutes les chansons de la base de données.
Définition à la ligne 28 du fichier chanson.dao.php.
Références hydrateMany().
| ChansonDAO::findAllFromUser | ( | ?string | $email = null | ) |
Définition à la ligne 94 du fichier chanson.dao.php.
Références hydrateMany().
| ChansonDAO::findByTitreExact | ( | string | $titre, |
| int | $idAlbum | ||
| ) |
Définition à la ligne 237 du fichier chanson.dao.php.
| ChansonDAO::findChansonsLikees | ( | string | ) |
Récupère les chansons likées par un utilisateur.
Définition à la ligne 297 du fichier chanson.dao.php.
Références hydrate().
| ChansonDAO::findId | ( | int | $id | ) |
Définition à la ligne 39 du fichier chanson.dao.php.
Références hydrate().
| ChansonDAO::findTrending | ( | int | $limit = 8, |
| int | $daysAgo = 7 |
||
| ) |
Définition à la ligne 53 du fichier chanson.dao.php.
Références hydrateMany().
| ChansonDAO::getPdo | ( | ) |
| ChansonDAO::getTotalEcoutesByArtiste | ( | string | $emailArtiste | ) |
Calcule le nombre total d'écoutes pour toutes les chansons d'un artiste.
| string | $emailArtiste | L'email de l'artiste |
Définition à la ligne 401 du fichier chanson.dao.php.
| ChansonDAO::hydrate | ( | array | $tableaAssoc | ) |
Définition à la ligne 107 du fichier chanson.dao.php.
Référencé par findChansonsLikees(), findId(), et hydrateMany().
| ChansonDAO::hydrateMany | ( | array | $tableauxAssoc | ) |
Définition à la ligne 145 du fichier chanson.dao.php.
Références hydrate().
Référencé par filtrerChanson(), findAll(), findAllFromUser(), findTrending(), rechercherParAlbum(), et rechercherParTitre().
| ChansonDAO::incrementNbEcoute | ( | int | $idChanson | ) |
Incrémente le compteur d'écoutes d'une chanson de 1 et retourne la nouvelle valeur.
| int | $idChanson |
Définition à la ligne 278 du fichier chanson.dao.php.
| ChansonDAO::rechercherParAlbum | ( | int | $idAlbum | ) |
Définition à la ligne 167 du fichier chanson.dao.php.
Références hydrateMany().
| ChansonDAO::rechercherParTitre | ( | string | $titre | ) |
Définition à la ligne 154 du fichier chanson.dao.php.
Références hydrateMany().
| ChansonDAO::setPdo | ( | $pdo | ) |
| ChansonDAO::toggleLike | ( | string | $emailUtilisateur, |
| int | $idChanson | ||
| ) |
Bascule le like d'une chanson (ajoute ou supprime)
Définition à la ligne 354 du fichier chanson.dao.php.
Références addChansonLikee().
| ChansonDAO::updateChanson | ( | Chanson | $chanson | ) |
Définition à la ligne 243 du fichier chanson.dao.php.
Références Chanson\getGenreChanson(), Chanson\getIdChanson(), et Chanson\getTitreChanson().
| ChansonDAO::updateChansonLikee | ( | string | $emailUtilisateur, |
| int | $idChanson | ||
| ) |
Met à jour un like (change la date)
Définition à la ligne 338 du fichier chanson.dao.php.
|
private |
Définition à la ligne 13 du fichier chanson.dao.php.
Référencé par __construct(), getPdo(), et setPdo().