public function get($key, $default = null)
    {
        if ($this->has($key)) {
            return $this->storage[$key] == null
                ? $default
                : $this->storage[$key];
        }

        if ($default !== null) {
            if (is_callable($default)) {
                return call_user_func($default);
            }

            return $default;
        }

        return null;
    }
public function get($key, $default = null)
    {
        if ($this->has($key)) {
            return $this->storage[$key] == null
                ? $default
                : $this->storage[$key];
        }

        if ($default !== null) {
            if (is_callable($default)) {
                return call_user_func($default);
            }

            return $default;
        }

        return null;
    }
public function get ( $ key , $ default = null ) { if ( $ this -> has ( $ key ) ) { return $ this -> storage [ $ key ] == null ? $ default : $ this -> storage [ $ key ] ; } if ( $ default !== null ) { if ( is_callable ( $ default ) ) { return call_user_func ( $ default ) ; } return $ default ; } return null ; }
Allows to recover a value or value collection.

@param string $key
@param mixed  $default

@return mixed
Allows to recover a value or value collection .