public function get($name = null, $default = '', $sanitize = true)
    {
        if (!isset($name)) {
            return $this->server;
        }

        if (!array_key_exists($name, $this->server)) {
            return $default;
        }

        if (is_array($this->server[$name])) {
            gplcart_array_trim($this->server[$name], $sanitize);
        } else {

            $this->server[$name] = trim($this->server[$name]);

            if ($sanitize) {
                $this->server[$name] = filter_var($this->server[$name], FILTER_SANITIZE_STRING);
            }
        }

        return $this->server[$name];
    }
public function get($name = null, $default = '', $sanitize = true)
    {
        if (!isset($name)) {
            return $this->server;
        }

        if (!array_key_exists($name, $this->server)) {
            return $default;
        }

        if (is_array($this->server[$name])) {
            gplcart_array_trim($this->server[$name], $sanitize);
        } else {

            $this->server[$name] = trim($this->server[$name]);

            if ($sanitize) {
                $this->server[$name] = filter_var($this->server[$name], FILTER_SANITIZE_STRING);
            }
        }

        return $this->server[$name];
    }
public function get ( $ name = null , $ default = '' , $ sanitize = true ) { if ( ! isset ( $ name ) ) { return $ this -> server ; } if ( ! array_key_exists ( $ name , $ this -> server ) ) { return $ default ; } if ( is_array ( $ this -> server [ $ name ] ) ) { gplcart_array_trim ( $ this -> server [ $ name ] , $ sanitize ) ; } else { $ this -> server [ $ name ] = trim ( $ this -> server [ $ name ] ) ; if ( $ sanitize ) { $ this -> server [ $ name ] = filter_var ( $ this -> server [ $ name ] , FILTER_SANITIZE_STRING ) ; } } return $ this -> server [ $ name ] ; }
Returns a server data
@param string $name
@param mixed $default
@param bool $sanitize
@return mixed
Returns a server data