public static function setFromKey(&$data, $key, $value, $separator = '/')
    {
        if (is_string($key)) {
            $key = explode($separator, $key);
        }
        $data = self::recursiveSetFromKey($data, $key, $value);
    }
public static function setFromKey(&$data, $key, $value, $separator = '/')
    {
        if (is_string($key)) {
            $key = explode($separator, $key);
        }
        $data = self::recursiveSetFromKey($data, $key, $value);
    }
public static function setFromKey ( & $ data , $ key , $ value , $ separator = '/' ) { if ( is_string ( $ key ) ) { $ key = explode ( $ separator , $ key ) ; } $ data = self :: recursiveSetFromKey ( $ data , $ key , $ value ) ; }
Set data inside an array

@param array           $data      array to set new value in
@param string[]|string $key       Key or path to the value to set
(either array or string separated with the separator)
@param mixed           $value     Value to put
@param string          $separator separator to use with the string
Set data inside an array