Completed
Pull Request — master (#6)
by Sandor
03:18
created

AbstractRepository::setConfig()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
rs 9.4286
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
4
namespace Orbitale\Bundle\CmsBundle\Repository;
5
6
use Doctrine\ORM\EntityRepository;
7
8
/**
9
 * Class AbstractRepository
10
 * @package Orbitale\Bundle\CmsBundle\Repository
11
 */
12
class AbstractRepository extends EntityRepository
13
{
14
15
    /**
16
     * @var bool
17
     */
18
    protected $cacheEnabled = false;
19
20
    /**
21
     * @var int
22
     */
23
    protected $cacheTtl;
24
25
    /**
26
     * @param array $config
27
     */
28
    public function setConfig(array $config)
29
    {
30
        $this->cacheEnabled = $config['cache']['enabled'];
31
        $this->cacheTtl = $config['cache']['ttl'];
32
    }
33
}