| Conditions | 3 |
| Paths | 3 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | public function init() |
||
| 33 | { |
||
| 34 | // @var $serverCache Cache |
||
| 35 | $serverCache = $this->getDI()->get('serverCache'); |
||
| 36 | $cachedContents = $serverCache->get(self::CACHE_KEY); |
||
| 37 | if (!$cachedContents) { |
||
| 38 | // Read ACL file |
||
| 39 | $aclObject = include __DIR__.'/../../web/config/acl.php'; |
||
| 40 | if ($aclObject) { |
||
| 41 | $this->acl = $aclObject->acl; |
||
| 42 | |||
| 43 | // Save it to serverCache |
||
| 44 | $serverCache->set(self::CACHE_KEY, serialize($aclObject->acl), self::CACHE_LIFETIME); |
||
| 45 | } |
||
| 46 | } else { |
||
| 47 | $this->acl = unserialize($cachedContents); |
||
| 48 | } |
||
| 49 | } |
||
| 50 | |||
| 56 |