Completed
Push — master ( 8aadd3...9420d2 )
by Alex
14:17
created

AbstractCmsRepository::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.4285
cc 1
eloc 3
nc 1
nop 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
 * @author Sandor Farkas <[email protected]>
19
 */
20
class AbstractCmsRepository extends EntityRepository
21
{
22
    /**
23
     * @var bool
24
     */
25
    protected $cacheEnabled = false;
26
27
    /**
28
     * @var int
29
     */
30
    protected $cacheTtl;
31
32
    /**
33
     * @param array $cacheConfig
34
     */
35
    public function setConfig(array $cacheConfig)
36
    {
37
        $this->cacheEnabled = $cacheConfig['enabled'];
38
        $this->cacheTtl = $cacheConfig['ttl'];
39
    }
40
}
41