public function getData($key = null, $default = null)
    {
        if (!isset($key)) {
            return $this->data;
        }

        $result = gplcart_array_get($this->data, $key);
        return isset($result) ? $result : $default;
    }
public function getData($key = null, $default = null)
    {
        if (!isset($key)) {
            return $this->data;
        }

        $result = gplcart_array_get($this->data, $key);
        return isset($result) ? $result : $default;
    }
public function getData ( $ key = null , $ default = null ) { if ( ! isset ( $ key ) ) { return $ this -> data ; } $ result = gplcart_array_get ( $ this -> data , $ key ) ; return isset ( $ result ) ? $ result : $ default ; }
Returns a value from an array of template variables
@param string|array|null $key
@param mixed
@return mixed
Returns a value from an array of template variables