add docs entity

pull/17/head
parent c62529c821
commit 984c94a3b7

@ -1,51 +0,0 @@
<?php
namespace Entity;
class CharacterEntity
{
private int $id_character;
private string $name;
private string $img_char;
public function __construct(int $id_character, string $name, string $img_char)
{
$this -> id_character = $id_character;
$this -> name = $name;
$this -> img_char = $img_char;
}
public function getIdCharacter(): int
{
return $this -> id_character;
}
public function getName(): string
{
return $this -> name;
}
public function getImgChar(): string
{
return $this -> img_char;
}
public function setIdCharacter(int $id_character): void
{
$this -> id_character = $id_character;
}
public function setName(string $name): void
{
$this -> name = $name;
}
public function setImgChar(string $img_char): void
{
$this -> img_char = $img_char;
}
}

@ -0,0 +1,76 @@
<?php
class CharacterEntity
{
private int $id_character;
private string $name;
private string $img_path;
/**
* @param int $id_character
* @param string $name
* @param string $img_path
*/
public function __construct(int $id_character, string $name, string $img_path)
{
$this->id_character = $id_character;
$this->name = $name;
$this->img_path = $img_path;
}
/**
* @return int
*/
public function getIdCharacter(): int
{
return $this->id_character;
}
/**
* @param int $id_character
*/
public function setIdCharacter(int $id_character): void
{
$this->id_character = $id_character;
}
/**
* @return string
*/
public function getName(): string
{
return $this->name;
}
/**
* @param string $name
*/
public function setName(string $name): void
{
$this->name = $name;
}
/**
* @return string
*/
public function getImgPath(): string
{
return $this->img_path;
}
/**
* @param string $img_path
*/
public function setImgPath(string $img_path): void
{
$this->img_path = $img_path;
}
}

@ -6,34 +6,66 @@ class CommentaryEntity {
private string $comment;
private string $date;
public function __construct(int $id_comment, string $comment, string $date) {
/**
* @param int $id_comment
* @param string $comment
* @param string $date
*/
public function __construct(int $id_comment, string $comment, string $date)
{
$this->id_comment = $id_comment;
$this->comment = $comment;
$this->date = $date;
}
public function getIdComment(): int {
/**
* @return int
*/
public function getIdComment(): int
{
return $this->id_comment;
}
public function getComment(): string {
return $this->comment;
}
public function getDate(): string {
return $this->date;
}
public function setIdComment(int $id_comment): void {
/**
* @param int $id_comment
*/
public function setIdComment(int $id_comment): void
{
$this->id_comment = $id_comment;
}
public function setComment(string $comment): void {
/**
* @return string
*/
public function getComment(): string
{
return $this->comment;
}
/**
* @param string $comment
*/
public function setComment(string $comment): void
{
$this->comment = $comment;
}
public function setDate(string $date): void {
/**
* @return string
*/
public function getDate(): string
{
return $this->date;
}
/**
* @param string $date
*/
public function setDate(string $date): void
{
$this->date = $date;
}
}

@ -8,19 +8,49 @@ class QuizEntity
private int $nb_questions;
/**
* @param int $id_quiz
* @param int $nb_questions
*/
public function __construct(int $id_quiz, int $nb_questions)
{
$this -> id_quiz = $id_quiz;
$this -> nb_questions = $nb_questions;
$this->id_quiz = $id_quiz;
$this->nb_questions = $nb_questions;
}
/**
* @return int
*/
public function getIdQuiz(): int
{
return $this -> id_quiz;
return $this->id_quiz;
}
/**
* @param int $id_quiz
*/
public function setIdQuiz(int $id_quiz): void
{
$this->id_quiz = $id_quiz;
}
/**
* @return int
*/
public function getNbQuestions(): int
{
return $this -> nb_questions;
return $this->nb_questions;
}
/**
* @param int $nb_questions
*/
public function setNbQuestions(int $nb_questions): void
{
$this->nb_questions = $nb_questions;
}
}

@ -11,7 +11,18 @@
private int $like;
private string $langue;
function __construct(int $id, string $content, string $carac, string $imgPath, string $titleSrc, string $dateSrc, int $like, string $langue) {
/**
* @param int $id
* @param string $content
* @param string $carac
* @param string $imgPath
* @param string $titleSrc
* @param string $dateSrc
* @param int $like
* @param string $langue
*/
public function __construct(int $id, string $content, string $carac, string $imgPath, string $titleSrc, string $dateSrc, int $like, string $langue)
{
$this->id = $id;
$this->content = $content;
$this->carac = $carac;
@ -22,68 +33,135 @@
$this->langue = $langue;
}
public function getId() : int{
return $id;
/**
* @return int
*/
public function getId(): int
{
return $this->id;
}
public function getContent() : string{
return $content;
/**
* @param int $id
*/
public function setId(int $id): void
{
$this->id = $id;
}
public function getCarac() : string{
return $content;
/**
* @return string
*/
public function getContent(): string
{
return $this->content;
}
public function getImgPath() : string{
return $imgPath;
/**
* @param string $content
*/
public function setContent(string $content): void
{
$this->content = $content;
}
public function getTitleSrc() : string{
return $titleSrc;
/**
* @return string
*/
public function getCarac(): string
{
return $this->carac;
}
public function getDateSrc() : string{
return $dateSrc;
/**
* @param string $carac
*/
public function setCarac(string $carac): void
{
$this->carac = $carac;
}
public function getLike() : int{
return $like;
/**
* @return string
*/
public function getImgPath(): string
{
return $this->imgPath;
}
public function getLangue() : string{
return $langue;
/**
* @param string $imgPath
*/
public function setImgPath(string $imgPath): void
{
$this->imgPath = $imgPath;
}
public function setId(int $id){
$this->id = $id;
/**
* @return string
*/
public function getTitleSrc(): string
{
return $this->titleSrc;
}
public function setContent(string $content){
$this->content = $content;
/**
* @param string $titleSrc
*/
public function setTitleSrc(string $titleSrc): void
{
$this->titleSrc = $titleSrc;
}
public function setCarac(string $carac){
$this->carac = $carac;
/**
* @return string
*/
public function getDateSrc(): string
{
return $this->dateSrc;
}
public function setImgPath(string $imgPat){
$this->imgPath = $imgPath;
/**
* @param string $dateSrc
*/
public function setDateSrc(string $dateSrc): void
{
$this->dateSrc = $dateSrc;
}
public function setTitleSrc(string $titleSrc){
$this->titleSrc = $titleSrc;
/**
* @return int
*/
public function getLike(): int
{
return $this->like;
}
public function setDateSrc(string $dateSrc){
$this->datesrc = $dateSrc;
/**
* @param int $like
*/
public function setLike(int $like): void
{
$this->like = $like;
}
public function setLike(int $like){
$this->like = $like;
/**
* @return string
*/
public function getLangue(): string
{
return $this->langue;
}
public function setlangue(string $langue){
/**
* @param string $langue
*/
public function setLangue(string $langue): void
{
$this->langue = $langue;
}
}
?>

@ -8,40 +8,69 @@ class SourceEntity
private string $date;
/**
* @param int $id_source
* @param string $title
* @param string $date
*/
public function __construct(int $id_source, string $title, string $date)
{
$this -> id_source = $id_source ;
$this -> title = $title ;
$this -> date = $date;
$this->id_source = $id_source;
$this->title = $title;
$this->date = $date;
}
public function getIdSource() : int
/**
* @return int
*/
public function getIdSource(): int
{
return $this -> id_source ;
return $this->id_source;
}
public function getTitle() : string
/**
* @param int $id_source
*/
public function setIdSource(int $id_source): void
{
return $this -> title ;
$this->id_source = $id_source;
}
public function getDate() : string
/**
* @return string
*/
public function getTitle(): string
{
return $this -> date ;
return $this->title;
}
public function setIdSource(int $id_source) : void
/**
* @param string $title
*/
public function setTitle(string $title): void
{
$this -> id_source = $id_source ;
$this->title = $title;
}
public function setTitle(string $title): void{
$this -> title = $title ;
/**
* @return string
*/
public function getDate(): string
{
return $this->date;
}
public function setDate(string $date) : void
/**
* @param string $date
*/
public function setDate(string $date): void
{
$this -> date = $date ;
$this->date = $date;
}
}

@ -9,51 +9,35 @@
private string $img;
private string $email;
function __construct(string $id, string $pseudo, string $password, string $image, string $mail) {
/**
* @param string $id
* @param string $username
* @param string $passwd
* @param string $hidenPasswd
* @param string $img
* @param string $email
*/
public function __construct(string $id, string $username, string $passwd, string $img, string $email)
{
$this->id = $id;
$this->username = $pseudo;
$this->passwd = $password;
$this->hidenPasswd = hidenPassWd($password);
$this->img = $image;
$this->email = $mail;
$this->username = $username;
$this->passwd = $passwd;
$this->hidenPasswd = hidenPasswd($passwd);
$this->img = $img;
$this->email = $email;
}
public function getId() : string{
return $this->id;
}
public function getUsername() : string{
return $this->username;
}
public function getPasswd() : string{
return $this->passwd;
}
public function getImg() : string{
return $this->img;
}
public function getEmail() : string{
return $this->email;
}
public function setUsername(string $username){
$this->username = $username;
}
public function setPasswd(string $passwd){
$this->passwd = $passwd;
$this->hidenPassWd = hidenPassWd($passwd);
}
public function setImg(string $img){
$this->img = $img;
}
public function setEmail(string $email){
$this->email = $email;
}
}

Loading…
Cancel
Save