Esempio n. 1
0
 /**
  *
  * @param string $string
  * @param string $language
  * @return string
  */
 public function translate($string, $language)
 {
     $key = "{$string}-to-{$language}";
     if ($this->cache->exists($key)) {
         return $this->cache->load($key);
     }
     if ($this->hasTranslate($string, $language)) {
         $strings = $this->getDBStrings($language);
         $string = $strings[$string];
         $this->cache->save($key, $string);
     }
     return $string;
 }
Esempio n. 2
0
 /**
  *
  */
 public function remove($key)
 {
     $this->primaryStorage->remove($key);
     $this->secondaryStorage->remove($key);
 }
Esempio n. 3
0
 /**
  *
  */
 public function removeAllCache()
 {
     $this->cache->removeAll();
 }
Esempio n. 4
0
 /**
  * Elimina el cache
  * @return unknown_type
  */
 public function clearCache()
 {
     $this->cache->remove('acl');
 }