AbstractCmsRepository   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 21
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A setConfig() 0 5 1
1
<?php
2
3
/*
4
* This file is part of the OrbitaleCmsBundle package.
5
*
6
* (c) Alexandre Rock Ancelet <[email protected]>
7
*
8
* For the full copyright and license information, please view the LICENSE
9
* file that was distributed with this source code.
10
*/
11
12
namespace Orbitale\Bundle\CmsBundle\Repository;
13
14
use Doctrine\ORM\EntityRepository;
15
16
/**
17
 * This class is used to allow all CmsBundle's repositories to use Doctrine cache.
18
 *
19
 * @author Sandor Farkas <[email protected]>
20
 */
21
class AbstractCmsRepository extends EntityRepository
22
{
23
    /**
24
     * @var bool
25
     */
26
    protected $cacheEnabled = false;
27
28
    /**
29
     * @var int
30
     */
31
    protected $cacheTtl;
32
33
    /**
34
     * @param array $cacheConfig
35
     */
36
    public function setConfig(array $cacheConfig)
37
    {
38
        $this->cacheEnabled = $cacheConfig['enabled'];
39
        $this->cacheTtl     = $cacheConfig['ttl'];
40
    }
41
}
42