Re actualizado hall.php y session.php
por favor, no los volvais a sobrescribir y pongais de nuevo todos los dto y sus interfaces
This commit is contained in:
parent
c47c7fd50e
commit
83f4264ccb
44
assets/php/common/hall.php
Normal file
44
assets/php/common/hall.php
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
<?php
|
||||||
|
include_once('../assets/php/common/hall_dao.php');
|
||||||
|
|
||||||
|
class Hall{
|
||||||
|
|
||||||
|
//Attributes:
|
||||||
|
private $_number; //Room number.
|
||||||
|
private $_idcinema; //Cinema Id
|
||||||
|
private $_numRows; //Num rows.
|
||||||
|
private $_numCol; //Num columns.
|
||||||
|
|
||||||
|
//Constructor:
|
||||||
|
function __construct($number, $idcinema, $numRows, $numCol){
|
||||||
|
$this->_number = $number;
|
||||||
|
$this->_idcinema = $idcinema;
|
||||||
|
$this->_numRows = $numRows;
|
||||||
|
$this->_numCol = $numCol;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Methods:
|
||||||
|
public static function getListHalls($cinema){
|
||||||
|
$bd = new HallDAO('complucine');
|
||||||
|
if($bd )
|
||||||
|
return $bd->getAllHalls($cinema);
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Getters && Setters:
|
||||||
|
public function setNumber($number){ $this->_number = $number; }
|
||||||
|
public function getNumber(){ return $this->_number; }
|
||||||
|
|
||||||
|
public function setIdcinema($idcinema){ $this->_idcinema = $idcinema; }
|
||||||
|
public function getIdcinema(){ return $this->_idcinema; }
|
||||||
|
|
||||||
|
public function setNumRows($numRows){ $this->_numRows = $numRows; }
|
||||||
|
public function getNumRows(){ return $this->_numRows; }
|
||||||
|
|
||||||
|
public function setNumCol($numCol){ $this->_numCol = $numCol; }
|
||||||
|
public function getNumCol(){ return $this->_numCol; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once('../assets/php/dao.php');
|
require_once('../assets/php/dao.php');
|
||||||
include_once('hall_dto.php');
|
include_once('hall.php');
|
||||||
|
|
||||||
class HallDAO extends DAO {
|
class HallDAO extends DAO {
|
||||||
|
|
||||||
@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
//Create a new Hall Data Transfer Object.
|
//Create a new Hall Data Transfer Object.
|
||||||
public function loadHall($number, $idcinema, $numrows, $numcolumns){
|
public function loadHall($number, $idcinema, $numrows, $numcolumns){
|
||||||
return new HallDTO($number, $idcinema, $numrows, $numcolumns);
|
return new Hall($number, $idcinema, $numrows, $numcolumns);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Edit Hall.
|
//Edit Hall.
|
||||||
|
49
assets/php/common/session.php
Normal file
49
assets/php/common/session.php
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
<?php
|
||||||
|
class Session{
|
||||||
|
|
||||||
|
private $_id;
|
||||||
|
private $_idfilm;
|
||||||
|
private $_idhall;
|
||||||
|
private $_idcinema;
|
||||||
|
private $_date;
|
||||||
|
private $_startTime;
|
||||||
|
private $_seatPrice;
|
||||||
|
private $_format;
|
||||||
|
|
||||||
|
function __construct($id, $idfilm, $idhall, $idcinema, $date, $startTime, $seatPrice, $format){
|
||||||
|
$this->_id = $id;
|
||||||
|
$this->_idfilm = $idfilm;
|
||||||
|
$this->_idhall = $idhall;
|
||||||
|
$this->_idcinema = $idcinema;
|
||||||
|
$this->_date = $date;
|
||||||
|
$this->_startTime = $startTime;
|
||||||
|
$this->_seatPrice = $seatPrice;
|
||||||
|
$this->_format = $format;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setId($id){ $this->_id = $id; }
|
||||||
|
public function getId(){ return $this->_id; }
|
||||||
|
|
||||||
|
public function setIdfilm($idfilm){ $this->_idfilm = $idfilm; }
|
||||||
|
public function getIdfilm(){ return $this->_idfilm; }
|
||||||
|
|
||||||
|
public function setIdhall($idhall){ $this->_idhall = $idhall; }
|
||||||
|
public function getIdhall(){ return $this->_idhall; }
|
||||||
|
|
||||||
|
public function setIdcinema($cinema){ $this->_idcinema = $idcinema; }
|
||||||
|
public function getIdcinema(){ return $this->_idcinema; }
|
||||||
|
|
||||||
|
public function setDate($date){ $this->_date = $date; }
|
||||||
|
public function getDate(){ return $this->_date; }
|
||||||
|
|
||||||
|
public function setStartTime($startTime){ $this->_startTime = $startTime; }
|
||||||
|
public function getStartTime(){ return $this->_startTime; }
|
||||||
|
|
||||||
|
public function setSeatPrice($seatPrice){ $this->_seatPrice = $seatPrice; }
|
||||||
|
public function getSeatPrice(){ return $this->_seatPrice; }
|
||||||
|
|
||||||
|
public function setFormat($format){ $this->_format = $format; }
|
||||||
|
public function getFormat(){ return $this->_format; }
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
Loading…
Reference in New Issue
Block a user