33 lines
646 B
PHP
Executable File
33 lines
646 B
PHP
Executable File
<?php
|
|
|
|
class Project
|
|
{
|
|
private $ID;
|
|
private $Type;
|
|
private $Desc;
|
|
private $Title;
|
|
private $Cover;
|
|
private $LastUpdate;
|
|
|
|
public function __construct($id)
|
|
{
|
|
$this->ID = $id;
|
|
|
|
$result = Database::select('projects', '*', 'WHERE id = :id', data: [':id' => $id]);
|
|
|
|
$data = $result->fetch();
|
|
|
|
$this->ID = $data["id"];
|
|
$this->Type = $data["type"];
|
|
$this->Desc = $data["desc"];
|
|
$this->Title = $data["title"];
|
|
$this->Cover = $data["cover"];
|
|
$this->LastUpdate = betterDate($data["lastUpdate"]);
|
|
}
|
|
|
|
public function __get($what)
|
|
{
|
|
return property_exists($this, $what) ? $this->{$what} : null;
|
|
}
|
|
}
|