PluginProbe
Assistant – Every Day Productivity Apps / 0.3.1
Assistant – Every Day Productivity Apps v0.3.1
1.5.5 trunk 0.1.0 0.2.0 0.2.1 0.2.2 0.3.0 0.3.1 0.4 0.4.1 0.4.2 0.5.0 0.5.1 0.6.0 0.7.0 0.7.0.2 0.7.0.3 0.7.0.4 0.7.0.5 0.7.0.6 0.7.0.7 0.7.0.8 0.7.0.9 0.7.1 1.0 All 71 releases
assistant / backend / src / System / Container / ReflectionCacheArray.php

ReflectionCacheArray.php in Assistant – Every Day Productivity Apps 0.3.1, at backend/src/System/Container/ReflectionCacheArray.php

21 lines 504 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FL\Assistant\System\Container;
4
5 class ReflectionCacheArray implements ReflectionCache {
6
7 private $cache = [];
8
9 public function fetch( $key ) {
10 // The additional isset() check here improves performance but we also
11 // need array_key_exists() because some cached values === NULL.
12 return ( isset( $this->cache[ $key ] ) || array_key_exists( $key, $this->cache ) )
13 ? $this->cache[ $key ]
14 : false;
15 }
16
17 public function store( $key, $data ) {
18 $this->cache[ $key ] = $data;
19 }
20 }
21