Completed
Push — master ( 71bab5...9e3424 )
by Afshin
02:36
created

_DataAccess::__get()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 2
nc 2
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: afshin
5
 * Date: 11/24/17
6
 * Time: 12:21 AM
7
 */
8
9
namespace Core\Interfaces;
10
11
12
use Psr\Container\ContainerInterface;
13
use SlimFacades\Facade;
14
15
abstract class _DataAccess
16
{
17
    protected $container;
18
19
    function __construct(ContainerInterface $container)
20
    {
21
        $this->container = $container;
22
    }
23
24
    public function __get($property)
25
    {
26
        if ($this->container->{$property}) {
27
            return $this->container->{$property};
28
        }
29
    }
30
}