public function get(string $key, $default = null)
    {
        if (array_key_exists($key, $this->input)) {
            return $this->input[$key];
        } elseif (array_key_exists($key, $this->cache)) {
            return $this->cache[$key];
        }

        // No dot, then not nested keys. We already tried that key and were not lucky.
        if (false === strpos($key, '.')) {
            return $this->default($default);
        }

        try {
            $return = $this->find($this->input, $key);
        } catch (\Exception $e) {
            $return = $this->default($default);
        }
        return $return;
    }
public function get(string $key, $default = null)
    {
        if (array_key_exists($key, $this->input)) {
            return $this->input[$key];
        } elseif (array_key_exists($key, $this->cache)) {
            return $this->cache[$key];
        }

        // No dot, then not nested keys. We already tried that key and were not lucky.
        if (false === strpos($key, '.')) {
            return $this->default($default);
        }

        try {
            $return = $this->find($this->input, $key);
        } catch (\Exception $e) {
            $return = $this->default($default);
        }
        return $return;
    }
public function get ( string $ key , $ default = null ) { if ( array_key_exists ( $ key , $ this -> input ) ) { return $ this -> input [ $ key ] ; } elseif ( array_key_exists ( $ key , $ this -> cache ) ) { return $ this -> cache [ $ key ] ; } // No dot, then not nested keys. We already tried that key and were not lucky. if ( false === strpos ( $ key , '.' ) ) { return $ this -> default ( $ default ) ; } try { $ return = $ this -> find ( $ this -> input , $ key ) ; } catch ( \ Exception $ e ) { $ return = $ this -> default ( $ default ) ; } return $ return ; }
Returns an item using dot notation
@method get
@param  string $key
@param  mixed $default
@return mixed
Returns an item using dot notation