changed files to more updated version

This commit is contained in:
2019-09-12 12:02:17 +02:00
parent 53794ac310
commit d50b864082
84 changed files with 1560 additions and 933 deletions

View File

@@ -0,0 +1,13 @@
<?php
class Board {
public $id;
public $name;
public $permLevel;
function Board($id, $name, $permLevel){
$this->id = $id;
$this->name = $name;
$this->permLevel = $permLevel;
}
}

View File

@@ -0,0 +1,102 @@
<?php
class Reply {
public $id;
public $threadID;
public $userID;
public $content;
public $date;
public $owner;
function Reply($id, $threadID, $userID, $content, $date = null){
$this->id = $id;
$this->threadID = $threadID;
$this->userID = $userID;
$this->content = $content;
$dateTime = new DateTime($date);
$this->date = $dateTime;
}
/**
* @return mixed
*/
public function getOwner():User {
return $this->owner;
}
/**
* @param mixed $owner
*/
public function setOwner($owner) {
$this->owner = $owner;
}
/**
* @return mixed
*/
public function getId() {
return $this->id;
}
/**
* @return mixed
*/
public function getThreadID() {
return $this->threadID;
}
/**
* @return mixed
*/
public function getUserID() {
return $this->userID;
}
/**
* @return mixed
*/
public function getContent() {
return $this->content;
}
/**
* @return mixed
*/
public function getDate() {
return $this->date;
}
/**
* @param mixed $id
*/
public function setId($id) {
$this->id = $id;
}
/**
* @param mixed $threadID
*/
public function setThreadID($threadID) {
$this->threadID = $threadID;
}
/**
* @param mixed $userID
*/
public function setUserID($userID) {
$this->userID = $userID;
}
/**
* @param mixed $content
*/
public function setContent($content) {
$this->content = $content;
}
/**
* @param mixed $date
*/
public function setDate($date) {
$this->date = $date;
}
}

View File

@@ -0,0 +1,143 @@
<?php
class Thread {
private $id;
private $title;
private $boardID;
private $userID;
private $content;
private $date_created;
private $replies = [];
private $lastReplyDate;
private $owner;
function Thread($id, $userID, $boardID, $title, $content, $date_created = null) {
$this->id = $id;
$this->title = $title;
$this->boardID = $boardID;
$this->userID = $userID;
$this->content = $content;
$dateTime = new DateTime($date_created);
$this->date_created = $dateTime;
/*
if(isset($threadData)){
$this->id = $threadData['id'];
$this->title = $threadData['title'];
$this->boardID = $threadData['boardID'];
$this->userID = $threadData['userID'];
$this->content = $threadData['content'];
}
*/
}
/**
* @return multitype:
*/
public function getReplies() {
return $this->replies;
}
/**
* @return mixed
*/
public function getOwner():User {
return $this->owner;
}
/**
* @param multitype: $replies
*/
public function setReplies($replies) {
$this->replies = $replies;
}
/**
* @param mixed $owner
*/
public function setOwner($owner) {
$this->owner = $owner;
}
public function getId():int {
return $this->id;
}
/**
* @return string $title
*/
public function getTitle():string {
return $this->title;
}
/**
* @return int $boardID
*/
public function getBoardID():int {
return $this->boardID;
}
/**
* @return int $userID
*/
public function getUserID():int {
return $this->userID;
}
/**
* @return string $content
*/
public function getContent():string {
return $this->content;
}
/**
* @param string $id
*/
public function setId($id) {
$this->id = $id;
}
/**
* @param string $title
*/
public function setTitle($title) {
$this->title = $title;
}
/**
* @param string $boardID
*/
public function setBoardID($boardID) {
$this->boardID = $boardID;
}
/**
* @param string $userID
*/
public function setUserID($userID) {
$this->userID = $userID;
}
/**
* @param string $content
*/
public function setContent($content) {
$this->content = $content;
}
/**
* @return DateTime
*/
public function getDate_created() {
return $this->date_created;
}
/**
* @param DateTime $date_created
*/
public function setDate_created($date_created) {
$this->date_created = $date_created;
}
}

View File

@@ -0,0 +1,138 @@
<?php
class User {
public $id;
public $username;
public $email;
public $password;
public $reg_date;
public $login_date;
public $reg_ip;
public $permissions;
function User($id, $username, $email, $password, $reg_date, $login_date, $reg_ip, $permissions){
$this->id = $id;
$this->username = $username;
$this->email = $email;
$this->password = $password;
$this->reg_date = $reg_date;
$this->login_date = $login_date;
$this->reg_ip=$reg_ip;
$this->permissions=$permissions;
}
/**
* @return mixed
*/
public function getId() {
return $this->id;
}
/**
* @return mixed
*/
public function getUsername() {
return $this->username;
}
/**
* @return mixed
*/
public function getEmail() {
return $this->email;
}
/**
* @return mixed
*/
public function getPassword() {
return $this->password;
}
/**
* @return mixed
*/
public function getReg_date() {
return $this->reg_date;
}
/**
* @return mixed
*/
public function getLogin_date() {
return $this->login_date;
}
/**
* @return mixed
*/
public function getReg_ip() {
return $this->reg_ip;
}
/**
* @return mixed
*/
public function getPermissions() {
return $this->permissions;
}
/**
* @param mixed $id
*/
public function setId($id) {
$this->id = $id;
}
/**
* @param mixed $username
*/
public function setUsername($username) {
$this->username = $username;
}
/**
* @param mixed $email
*/
public function setEmail($email) {
$this->email = $email;
}
/**
* @param mixed $password
*/
public function setPassword($password) {
$this->password = $password;
}
/**
* @param mixed $reg_date
*/
public function setReg_date($reg_date) {
$this->reg_date = $reg_date;
}
/**
* @param mixed $login_date
*/
public function setLogin_date($login_date) {
$this->login_date = $login_date;
}
/**
* @param mixed $reg_ip
*/
public function setReg_ip($reg_ip) {
$this->reg_ip = $reg_ip;
}
/**
* @param mixed $permissions
*/
public function setPermissions($permissions) {
$this->permissions = $permissions;
}
}