Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
eZHTTPTool Class Reference

## Public Member Functions
| __construct ()
| assignValues ( $position, $prefix="", $postfix="")

## Static Public Member Functions
static | getVar ( $name, $onlyCheckPost=false)
static | extractVar ( $vars, $onlyCheckPost=false)
static | header ( $string)
static & | addVariable ( $url, $variable, $value)
static & | removeVariable ( $url, $variable, $value="")
static | assignDate ( $start, $prefix="", $postfix="")
static | setCookie ( $variable, $value, $timeout=365)
static | globaleZHTTPTool ()

## Public Attributes
| $url_array = array()
| $url_array_length = 0

## Detailed Description

! eZCommon Provied utility functions for http.

// will return the HTTP post variable $CategoryID if set, false if not.
eZHTTPTool::getVar( "CategoryID", true );
eZHTTPTool\getVar
static getVar( $name, $onlyCheckPost=false)
Definition: ezhttptool.php:55

Definition at line 38 of file ezhttptool.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZHTTPTool::__construct | ( |  | ) |

Initialization of object;

Definition at line 43 of file ezhttptool.php.

## Member Function Documentation

## ◆ addVariable()

static& eZHTTPTool::addVariable | ( |  | $url,
|  |  | $variable,
|  |  | $value
| ) |  |
| static

Returns a url with the variable added to the url.

Definition at line 124 of file ezhttptool.php.

References $url.

Referenced by eZMenuBox\createBox(), and header().

## ◆ assignDate()

static eZHTTPTool::assignDate | ( |  | $start,
|  |  | $prefix = `""`,
|  |  | $postfix = `""`
| ) |  |
| static

This function will assign dates and times to the variables named $prefix . unit $postfix in the global scope, where unit is [Year|Month|Day|Hour|Minute|Second]. It will try to fill in as many as possible.

Definition at line 171 of file ezhttptool.php.

References $day, $hour, $minute, $month, $url_array, $url_array_length, and $year.

Referenced by assignValues().

## ◆ assignValues()

eZHTTPTool::assignValues | ( |  | $position,
|  |  | $prefix = `""`,
|  |  | $postfix = `""`
| ) |  |

This function will assign values to variables and name them named $prefix . unit $postfix in the global scope. It will only assign values to variables with names. It will also try to assign dates/times to any variables where the names in the url is called [start|begin|from|until|stop|end]

This function will parse the following url values, regardless of where they are in the url:

[start|begin|from|stop|end|until]/$year[/$month[/$day[/$hour[/$minute[/$second]]]]]

Any url part on the form:

string/value

will be parsed into a global variable called $prefix[string]$postfix

Definition at line 253 of file ezhttptool.php.

References $i, $j, $position, $url_array, $url_array_length, and assignDate().

## ◆ extractVar()

static eZHTTPTool::extractVar | ( |  | $vars,
|  |  | $onlyCheckPost = `false`
| ) |  |
| static

extracts a variable from Post or Get operations.

Returns false if the variable is not set.

Definition at line 80 of file ezhttptool.php.

References getVar().

## ◆ getVar()

static eZHTTPTool::getVar | ( |  | $name,
|  |  | $onlyCheckPost = `false`
| ) |  |
| static

fetches a variable from Post or Get operations.

Returns false if the variable is not set.

Definition at line 55 of file ezhttptool.php.

References $name, and $ret.

Referenced by eZCart\cartTotals(), extractVar(), and eZShippingType\vatType().

## ◆ globaleZHTTPTool()

static eZHTTPTool::globaleZHTTPTool | ( |  | ) |
| static

Initalizes the global object, and static variables.

Definition at line 325 of file ezhttptool.php.

## ◆ header()

static eZHTTPTool::header | ( |  | $string | ) |
| static

This function is a wrapper to the PHP function header();

It enabled cookieless sessions with header.

Definition at line 96 of file ezhttptool.php.

References $GlobalSiteIni, addVariable(), and removeVariable().

Referenced by eZMailAccount\checkMail(), createPollMenu(), getArticle(), eZMailAccount\getNewMail(), ezpbKernelAdmin\run(), send_email(), eZFormRenderer\sendForm(), setCookie(), and writeAtAll().

## ◆ removeVariable()

static& eZHTTPTool::removeVariable | ( |  | $url,
|  |  | $variable,
|  |  | $value = `""`
| ) |  |
| static

Returns a url with the variable removed from the url.

Definition at line 144 of file ezhttptool.php.

References $url.

Referenced by header(), and ezpbKernelAdmin\run().

## ◆ setCookie()

static eZHTTPTool::setCookie | ( |  | $variable,
|  |  | $value,
|  |  | $timeout = `365`
| ) |  |
| static

Will set a cookie variable.

Definition at line 312 of file ezhttptool.php.

References header().

## Member Data Documentation

## ◆ $url_array

eZHTTPTool::$url_array = array()

The global url exploded into an array.

Definition at line 339 of file ezhttptool.php.

Referenced by assignDate(), and assignValues().

## ◆ $url_array_length

eZHTTPTool::$url_array_length = 0

The number of elements in the global url array.

Definition at line 344 of file ezhttptool.php.

Referenced by assignDate(), and assignValues().

The documentation for this class was generated from the following file:

- ezhttptool.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.