From f6c07dfa857062050e2a2bc86023cd139fd6f70e Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Tue, 7 Apr 2015 19:22:42 +0200 Subject: [PATCH] Basics properties, getters and setters --- classes/class.Categorie.php | 2 +- classes/class.Format.php | 2 +- classes/class.Pays.php | 2 +- classes/class.Personne.php | 2 +- classes/class.Video.php | 172 ++++++++++++++++++++++++++++++++++++ 5 files changed, 176 insertions(+), 4 deletions(-) diff --git a/classes/class.Categorie.php b/classes/class.Categorie.php index 9b4e0f6..01f9fac 100644 --- a/classes/class.Categorie.php +++ b/classes/class.Categorie.php @@ -21,7 +21,7 @@ class Categorie } /** - * @param integer $id + * @param integer|null $id * @return Categorie */ public function setId($id) diff --git a/classes/class.Format.php b/classes/class.Format.php index 7c2b2cb..fd7ded2 100644 --- a/classes/class.Format.php +++ b/classes/class.Format.php @@ -26,7 +26,7 @@ class Format } /** - * @param integer $id + * @param integer|null $id * @return Format */ public function setId($id) diff --git a/classes/class.Pays.php b/classes/class.Pays.php index c782062..5bcb692 100644 --- a/classes/class.Pays.php +++ b/classes/class.Pays.php @@ -31,7 +31,7 @@ class Pays } /** - * @param integer $id + * @param integer|null $id * @return Pays */ public function setId($id) diff --git a/classes/class.Personne.php b/classes/class.Personne.php index 00c8b6d..1e8bb1b 100644 --- a/classes/class.Personne.php +++ b/classes/class.Personne.php @@ -33,7 +33,7 @@ class Personne } /** - * @param integer $id + * @param integer|null $id * @return Personne */ public function setId($id) diff --git a/classes/class.Video.php b/classes/class.Video.php index e69de29..9ea1bf7 100644 --- a/classes/class.Video.php +++ b/classes/class.Video.php @@ -0,0 +1,172 @@ +id = (int) $id; + + return $this; + } + + /** + * @return integer|null + */ + public function getId() + { + return $this->id; + } + + /** + * @param string $titre + * @return Video + */ + public function setTitre($titre) + { + $this->titre = (string) $titre; + + return $this; + } + + /** + * @return string|null + */ + public function getTitre() + { + return $this->titre; + } + + /** + * @param integer $duree + * @return Video + */ + public function setDuree($duree) + { + $this->duree = (int) $duree; + + return $this; + } + + /** + * @return integer|null + */ + public function getDuree() + { + return $this->duree; + } + + /** + * @param string $fichier + * @return Video + */ + public function setFichier($fichier) + { + $this->fichier = (string) $fichier; + + return $this; + } + + /** + * @return string|null + */ + public function getFichier() + { + return $this->fichier; + } + + /** + * @param string $image + * @return Video + */ + public function setImage($image) + { + $this->image = (string) $image; + + return $this; + } + + /** + * @return string|null + */ + public function getImage() + { + return $this->image; + } + + /** + * @param string $synopsis + * @return Video + */ + public function setSynopsis($synopsis) + { + $this->synopsis = (string) $synopsis; + + return $this; + } + + /** + * @return string|null + */ + public function getSynopsis() + { + return $this->synopsis; + } + + /** + * @param integer $annee + * @return Video + */ + public function setAnnee($annee) + { + $this->annee = (int) $annee; + + return $this; + } + + /** + * @return integer|null + */ + public function getAnnee() + { + return $this->annee; + } +}