_DataAccess::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
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
}