-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAdminDao.php
More file actions
50 lines (35 loc) · 811 Bytes
/
AdminDao.php
File metadata and controls
50 lines (35 loc) · 811 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
require_once 'DAO.php';
/**
* Class AdminDAO
*/
abstract class AdminDAO extends EntityBase
{
/**
* Protected variable
* @var varchar $email
*/
protected $email;
public function getEmail() {return $this->email;}
public function setEmail($email) {$this->email=$email;}
/**
* Protected variable
* @var varchar $password
*/
protected $password;
public function getPassword() {return $this->password;}
public function setPassword($password) {$this->password=$password;}
/**
* Constructor
* @var mixed $id
*/
public function __construct($id=0)
{
parent::__construct();
$this->table='admin';
$this->primkeys=[];
$this->fields=['email','password'];
$this->sql="SELECT * FROM {$this->table}";
if($id) $this->read($id);
}
}