Completed
Push — master ( c18000...efec97 )
by Anton
12s
created

Table   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 46
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A init() 0 5 1
1
<?php
2
/**
3
 * @copyright Bluz PHP Team
4
 * @link https://github.com/bluzphp/skeleton
5
 */
6
7
/**
8
 * @namespace
9
 */
10
namespace Application\Users;
11
12
/**
13
 * Users Table
14
 *
15
 * @package  Application\Users
16
 *
17
 * @method   static Row findRow($primaryKey)
18
 * @method   static Row findRowWhere($whereList)
19
 *
20
 * @author   Anton Shevchuk
21
 * @created  08.07.11 17:36
22
 */
23
class Table extends \Bluz\Db\Table
24
{
25
    /**
26
     * Pending email verification
27
     */
28
    const STATUS_PENDING = 'pending';
29
    /**
30
     * Active user
31
     */
32
    const STATUS_ACTIVE = 'active';
33
    /**
34
     * Disabled by administrator
35
     */
36
    const STATUS_DISABLED = 'disabled';
37
    /**
38
     * Removed account
39
     */
40
    const STATUS_DELETED = 'deleted';
41
    /**
42
     * system user with ID=1
43
     */
44
    const SYSTEM_USER = 1;
45
46
    /**
47
     * Table
48
     *
49
     * @var string
50
     */
51
    protected $name = 'users';
52
53
    /**
54
     * Primary key(s)
55
     * @var array
56
     */
57
    protected $primary = array('id');
58
59
    /**
60
     * Init table relations
61
     * @return void
62
     */
63 1
    public function init()
64
    {
65 1
        $this->linkTo('id', 'UsersRoles', 'userId');
66 1
        $this->linkToMany('Roles', 'UsersRoles');
67 1
    }
68
}
69