Completed
Branch v2.0.0 (e47d62)
by Alexander
03:40
created

User::initialize()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 * @author Alexander Torosh <[email protected]>
4
 */
5
6
namespace DbModel;
7
8
use Phalcon\Mvc\Model as MvcModel;
9
10
class User extends MvcModel
11
{
12
    public static $roles = [
13
        'member',
14
        'editor',
15
        'admin',
16
    ];
17
    public $id = 0;
18
    public $email = '';
19
    public $name = '';
20
    public $role = 'member';
21
    public $password_hash = '';
22
23
    public $created_at;
24
    public $updated_at;
25
26
    public function initialize()
27
    {
28
        $this->setSource('users');
29
    }
30
}
31