Passed
Push — master ( ca838e...76d3e9 )
by Radu
01:16
created

AbstractRepository   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 5
dl 0
loc 27
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A pdoDb() 0 3 1
A mysqliDb() 0 3 1
A __construct() 0 3 1
A session() 0 3 1
A i18n() 0 3 1
1
<?php
2
namespace WebServCo\Framework;
3
4
use WebServCo\Framework\Framework as Fw;
5
6
abstract class AbstractRepository
7
{
8
    use \WebServCo\Framework\Traits\OutputTrait;
9
    
10
    public function __construct($outputLoader)
11
    {
12
        $this->outputLoader = $outputLoader;
13
    }
14
    
15
    final protected function pdoDb()
16
    {
17
        return Fw::getLibrary('PdoDatabase');
18
    }
19
    
20
    final protected function mysqliDb()
21
    {
22
        return Fw::getLibrary('MysqliDatabase');
23
    }
24
    
25
    final protected function i18n()
26
    {
27
        return Fw::getLibrary('I18n');
28
    }
29
    
30
    final protected function session()
31
    {
32
        return Fw::getLibrary('Session');
33
    }
34
}
35