Hoa central
Frontend.php
Go to the documentation of this file.
1 <?php
2 
37 namespace Hoa\Cache\Frontend;
38 
39 use Hoa\Cache;
40 use Hoa\Core;
41 
50 abstract class Frontend extends Cache
51 {
57  protected $_backend = null;
58 
59 
60 
67  public function __construct(Cache\Backend $backend)
68  {
69  parent::__construct();
70 
71  $this->_backend = $backend;
72 
73  return;
74  }
75 
82  public function cleanCache($lifetime = Cache::CLEAN_EXPIRED)
83  {
84  if (null === $this->_backend) {
85  return;
86  }
87 
88  return $this->_backend->clean($lifetime);
89  }
90 
96  public function getBackend()
97  {
98  return $this->_backend;
99  }
100 }
101 
105 Core\Consistency::flexEntity('Hoa\Cache\Frontend\Frontend');
cleanCache($lifetime=Cache::CLEAN_EXPIRED)
Definition: Frontend.php:82
const CLEAN_EXPIRED
Definition: Cache.php:62
__construct(Cache\Backend $backend)
Definition: Frontend.php:67