Source of file _config.php
Size: 1,889 Bytes - Last Modified: 2021-12-23T10:05:08+00:00
/var/www/docs.ssmods.com/process/src/_config.php
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 | <?php /** * Credit for following functions goes to taylorotwell (laravel/framework) * * @credit taylorotwell (laravel/framework) * @licence MIT */ if (!function_exists('array_set')) { /** * Set an array item to a given value using "dot" notation. * * If no key is given to the method, the entire array will be replaced. * * @param array $array * @param string $key * @param mixed $value * @return array */ function array_set(&$array, $key, $value) { if (is_null($key)) { return $array = $value; } $keys = explode('.', $key); while (count($keys) > 1) { $key = array_shift($keys); // If the key doesn't exist at this depth, we will just create an empty array // to hold the next value, allowing us to create the arrays to hold final // values at the correct depth. Then we'll keep digging into the array. if (!isset($array[$key]) || !is_array($array[$key])) { $array[$key] = []; } $array =& $array[$key]; } $array[array_shift($keys)] = $value; return $array; } } if (!function_exists('array_get')) { /** * Get an item from an array using "dot" notation. * * @param array $array * @param string $key * @param mixed $default * @return mixed */ function array_get($array, $key, $default = null) { if (is_null($key)) { return $array; } if (isset($array[$key])) { return $array[$key]; } foreach (explode('.', $key) as $segment) { if (!is_array($array) || !array_key_exists($segment, $array)) { return value($default); } $array = $array[$segment]; } return $array; } } |