| Total Complexity | 4 |
| Total Lines | 46 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | abstract class ContentFilter { |
||
| 17 | |||
| 18 | use configurable; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Nested content filter |
||
| 22 | * |
||
| 23 | * @var ContentFilter |
||
| 24 | */ |
||
| 25 | protected $nestedContentFilter; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Cache lifetime |
||
| 29 | * |
||
| 30 | * @config |
||
| 31 | * @var int |
||
| 32 | */ |
||
| 33 | private static $cache_lifetime = 300; |
||
|
|
|||
| 34 | |||
| 35 | public function __construct($nestedContentFilter = null) { |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Gets the cache to use |
||
| 41 | * |
||
| 42 | * @return Zend_Cache_Frontend |
||
| 43 | */ |
||
| 44 | protected function getCache() { |
||
| 45 | return Injector::inst()->get( |
||
| 46 | CacheInterface::class . '.VersionFeedController' |
||
| 47 | ); |
||
| 48 | } |
||
| 49 | |||
| 50 | /** |
||
| 51 | * Evaluates the result of the given callback |
||
| 52 | * |
||
| 53 | * @param string $key Unique key for this |
||
| 54 | * @param callable $callback Callback for evaluating the content |
||
| 55 | * @return mixed Result of $callback() |
||
| 56 | */ |
||
| 57 | public function getContent($key, $callback) { |
||
| 62 | } |
||
| 63 | } |
||
| 65 |