Esempio n. 1
0
 /**
  * @param array  $array
  * @param string $dottedKey
  *
  * @return mixed|null
  */
 public static function remove(array &$array, $dottedKey)
 {
     if (isset($array[$dottedKey])) {
         $value = $array[$dottedKey];
         unset($array[$dottedKey]);
         return $value;
     }
     $k = explode('.', $dottedKey, 2);
     return isset($k[1]) ? Arr::remove($array[$k[0]], $k[1]) : null;
 }
Esempio n. 2
0
 /**
  * @param string $dottedKey
  *
  * @return mixed|null
  */
 public function remove($dottedKey)
 {
     return Arr::remove($_SESSION, $dottedKey);
 }