This commit is contained in:
marian1010 2021-04-29 10:39:14 +02:00
parent 4affecf524
commit 090f820453
2 changed files with 36 additions and 50 deletions

View File

@ -1,37 +1,37 @@
<?php <?php
include_once('film_dto_interface.php'); include_once('film_dto_interface.php');
class Film_DTO implements FilmDTO { class Film_DTO implements FilmDTO {
//Attributes: //Attributes:
private $_id; //Film ID. private $_id; //Film ID.
private $_tittle; //Film tittle. private $_tittle; //Film tittle.
private $_duration; //Film duration. private $_duration; //Film duration.
private $_language; //Film language. private $_language; //Film language.
private $_description; //Film description. private $_description; //Film description.
//Constructor: //Constructor:
function __construct($id, $tittle, $duration, $language, $description){ function __construct($id, $tittle, $duration, $language, $description){
$this->_id = $id; $this->_id = $id;
$this->_tittle = $tittle; $this->_tittle = $tittle;
$this->_duration = $duration; $this->_duration = $duration;
$this->_language = $language; $this->_language = $language;
$this->_description = $description; $this->_description = $description;
} }
//Methods: //Methods:
//Getters && Setters: //Getters && Setters:
public function setId($id){ $this->_id = $id; } public function setId($id){ $this->_id = $id; }
public function getId(){ return $this->_id; } public function getId(){ return $this->_id; }
public function setTittle($tittle) {$this->_tittle = $tittle; } public function setTittle($tittle) {$this->_tittle = $tittle; }
public function getTittle(){return $this->_tittle;} public function getTittle(){return $this->_tittle;}
public function setDuration($duration){$this->_duration = $duration; } public function setDuration($duration){$this->_duration = $duration; }
public function getDuration() {return $this->_duration;} public function getDuration() {return $this->_duration;}
public function setLanguage($language) {$this->_language = $language; } public function setLanguage($language) {$this->_language = $language; }
public function getLanguage(){return $this->_language;} public function getLanguage(){return $this->_language;}
public function setDescription($description){ $this->_description = $description;} public function setDescription($description){ $this->_description = $description;}
public function getDescription(){return $this->_description;} public function getDescription(){return $this->_description;}
} }
?> ?>

View File

@ -1,14 +0,0 @@
<?php
interface FilmDTO {
public function setId($id);
public function getId();
public function setTittle($tittle);
public function getTittle();
public function setDuration($duration);
public function getDuration();
public function setLanguage($language);
public function getLanguage();
public function setDescription($description);
public function getDescription();
}
?>