set() public method

Sets (insert or updates) a translation for given key
public set ( string $translateKey, string $message ) : boolean
$translateKey string
$message string
return boolean
Example #1
0
 /**
  * Adds a translation for given key (No existence check!)
  *
  * @param  string  $translateKey
  * @param  string  $message
  * @return boolean
  */
 public function add($translateKey, $message)
 {
     $index = $this->getLongKey($translateKey);
     $key = $this->getShortKey($index);
     $this->loadValueByKey($key);
     if (!isset($this->cache[$key])) {
         $this->cache[$key] = [];
     }
     $this->cache[$key][$index] = $message;
     return $this->redis->set($key, serialize($this->cache[$key]));
 }