Пример #1
0
 /**
  * Removes a record.
  *
  * ```php
  * i18n::remove('foo.bar');
  * i18n::remove(['foo', 'bar']);
  * ```
  *
  * @param string|array $keys chain keys
  */
 public function remove($keys)
 {
     if (!isset(static::$data[$this->locale][$this->category])) {
         static::$data[$this->locale][$this->category] = [];
     }
     ArrayHelper::removeValue(static::$data[$this->locale][$this->category], !is_array($keys) ? explode('.', $keys) : $keys);
 }
Пример #2
0
 /**
  * @inheritdoc
  */
 public function remove($keys)
 {
     $_SESSION = ArrayHelper::removeValue($_SESSION, $keys);
 }