TYPO3 CMS  TYPO3_6-2
EarlyClassLoaderBackend.php
Go to the documentation of this file.
1 <?php
3 
18 
26 
30  protected $memoryBackend = array();
31 
35  public function __construct() {
36  parent::__construct('production', array());
37  }
38 
51  public function set($entryIdentifier, $data, array $tags = array(), $lifetime = NULL) {
52  $this->memoryBackend[$entryIdentifier] = $data;
53  }
54 
62  public function get($entryIdentifier) {
63  return isset($this->memoryBackend[$entryIdentifier]) ? $this->memoryBackend[$entryIdentifier] : FALSE;
64  }
65 
71  public function getAll() {
72  return $this->memoryBackend;
73  }
74 
82  public function has($entryIdentifier) {
83  return isset($this->memoryBackend[$entryIdentifier]);
84  }
85 
95  public function remove($entryIdentifier) {
96  if (isset($this->memoryBackend[$entryIdentifier])) {
97  unset($this->memoryBackend[$entryIdentifier]);
98  return TRUE;
99  }
100  return FALSE;
101  }
102 
109  public function flush() {
110  $this->memoryBackend = array();
111  }
112 
119  public function collectGarbage() {
120  }
121 
129  public function requireOnce($entryIdentifier) {
130  return isset($this->memoryBackend[$entryIdentifier]) ? require_once ($this->memoryBackend[$entryIdentifier]) : FALSE;
131  }
132 
141  public function setLinkToPhpFile($entryIdentifier, $filePath) {
142  $this->memoryBackend[$entryIdentifier] = $filePath;
143  }
144 
145 }