src/Config.php
public function get(string $name, $default = null)
    {
        $path = explode('.', $name);
        $current = $this->data;
        foreach ($path as $field) {
            if (isset($current) && isset($current[$field])) {
                $current = $current[$field];
            } elseif (is_array($current) && isset($current[$field])) {
                $current = $current[$field];
            } else {
                return $default;
            }
        }
        return $current;
    }
public function get(string $name, $default = null)
    {
        $path = explode('.', $name);
        $current = $this->data;
        foreach ($path as $field) {
            if (isset($current) && isset($current[$field])) {
                $current = $current[$field];
            } elseif (is_array($current) && isset($current[$field])) {
                $current = $current[$field];
            } else {
                return $default;
            }
        }
        return $current;
    }
public function get ( string $ name , $ default = null ) { $ path = explode ( '.' , $ name ) ; $ current = $ this -> data ; foreach ( $ path as $ field ) { if ( isset ( $ current ) && isset ( $ current [ $ field ] ) ) { $ current = $ current [ $ field ] ; } elseif ( is_array ( $ current ) && isset ( $ current [ $ field ] ) ) { $ current = $ current [ $ field ] ; } else { return $ default ; } } return $ current ; }
Get value by using dot notation for nested arrays.

@example $value = $this->get('foo.bar.baz');

@param string $name
@param mixed $default
@return mixed
Get value by using dot notation for nested arrays .