Completed
Push — master ( a3416c...a17b49 )
by Jared
02:25
created

Pivot::setProperties()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 2
1
<?php
2
3
/**
4
 * @author Jared King <[email protected]>
5
 *
6
 * @see http://jaredtking.com
7
 *
8
 * @copyright 2015 Jared King
9
 * @license MIT
10
 */
11
12
namespace Pulsar\Relation;
13
14
use Pulsar\Model;
15
16
class Pivot extends Model
17
{
18
    protected static $properties = [];
19
20
    /**
21
     * @var string
22
     */
23
    protected $_tablename;
24
25
    public function setTablename($tablename)
26
    {
27
        $this->_tablename = $tablename;
28
    }
29
30
    public function getTablename()
31
    {
32
        return $this->_tablename;
33
    }
34
35
    public function setProperties($localKey, $foreignKey)
36
    {
37
        self::$properties = [
38
            $localKey => [],
39
            $foreignKey => [],
40
        ];
41
        $this->initialize();
42
    }
43
}
44