|
Tv2 documentation | |||||
PREV NEXT | FRAMES NO FRAME | |||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Protocol abstraction for pyramid-framework. It may look as total bloat, but really it is very useful.
Field Summary | |
private array | $client Client vars |
private array | $commands Commands (HTTP headers) |
private string | $cookien Cookie name |
private object | $db Link to the database |
private array | $protocol Protocol vars |
private array | $request Request vars |
private string | $scookie Session cookie name |
private array | $server Server vars |
private array | $session Session vars |
private string | $sid Session id |
private integer | $slifetime Session lifetime (defaults to 1200 s = 20 min. |
private string | $stable Session table name |
Constructor Summary | |
void | ctlHttpProtocol() Constructor. |
Method Summary | |
boolean | delClientVar(string $name) Removes variable on client |
boolean | delSessionVar(string $name) Removes variable from session |
void | emptyClientVars() Removes all client variables |
void | emptySessionVars() Removes all variables from session |
boolean | endSession() Ends session |
private boolean | error(string $msg) Sends an error to the error handler |
array | getAllRequestVars() Returns all request variables as an associative array |
mixed | getClientVar(string $name) Returns a client var |
mixed | getRequestVar(string $name) Returns request variable value |
mixed | getServerVar(string $name) Returns server variable value |
mixed | getSessionVar(string $name) Returns session variable value |
boolean | loadSession() Loads session status and variables |
void | output(string $content) Outputs data, saves session, etc. |
boolean | outputFile(string $fname, string $disp) Outputs local system file with correct headers, saves session, etc. |
boolean | regClientVar(string $name, mixed& $var) Registers an external variable as client variable. |
boolean | regSessionVar(string $name, mixed& $var) Registers an external variable as session variable. |
boolean | saveSession() Saves session status and variables |
void | sendCommand(string $cmd) Use this instead of header() function - adds header to a stack (so it won't conflict with cookies) |
boolean | setClientVar(string $name, [mixed $value]) Sets variable on client (cookie) |
boolean | setSessionVar(string $name, [mixed $value]) Sets session variable |
void | start() Starts sessions, fills variable arrays |
boolean | startSession() Starts a session |
Field Detail |
private array $client
Client vars
private array $commands
Commands (HTTP headers)
private string $cookien
Cookie name
private object $db
Link to the database
private array $protocol
Protocol vars
private array $request
Request vars
private string $scookie
Session cookie name
private array $server
Server vars
private array $session
Session vars
private string $sid
Session id
private integer $slifetime
Session lifetime (defaults to 1200 s = 20 min.)
private string $stable
Session table name
Constructor Detail |
void ctlHttpProtocol()
Constructor. Fills attributes with values either from global $config or with default values.
Method Detail |
boolean delClientVar(string $name)
Removes variable on client
name
- variable nameboolean delSessionVar(string $name)
Removes variable from session
name
- variable namevoid emptyClientVars()
Removes all client variables
void emptySessionVars()
Removes all variables from session
boolean endSession()
Ends session
private boolean error(string $msg)
Sends an error to the error handler
msg
- Error messagearray getAllRequestVars()
Returns all request variables as an associative array
mixed getClientVar(string $name)
Returns a client var
name
- variable namemixed getRequestVar(string $name)
Returns request variable value
name
- variable namemixed getServerVar(string $name)
Returns server variable value
name
- variable namemixed getSessionVar(string $name)
Returns session variable value
name
- variable nameboolean loadSession()
Loads session status and variables
void output(string $content)
Outputs data, saves session, etc.
content
- Data for outputingboolean outputFile(string $fname, string $disp)
Outputs local system file with correct headers, saves session, etc.
fname
- file name (NOTE: '../' is replaced for security reasons)disp
- Content-Disposition type (default attachment)boolean regClientVar(string $name, mixed& $var)
Registers an external variable as client variable. Usefull for keeping client variable up to date automatically.
name
- variable namevar
- Reference to external variableboolean regSessionVar(string $name, mixed& $var)
Registers an external variable as session variable. Usefull for keeping session variable up to date automatically.
name
- variable namevar
- variableboolean saveSession()
Saves session status and variables
void sendCommand(string $cmd)
Use this instead of header() function - adds header to a stack (so it won't conflict with cookies)
cmd
- HTTP headerboolean setClientVar(string $name, [mixed $value])
Sets variable on client (cookie)
name
- variable namevalue
- Variable valueboolean setSessionVar(string $name, [mixed $value])
Sets session variable
name
- variable namevalue
- variable valuevoid start()
Starts sessions, fills variable arrays
boolean startSession()
Starts a session
|
Tv2 documentation | |||||
PREV NEXT | FRAMES NO FRAME | |||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This document was generated by phpdocgen 0.17-rc3.
Copyright © 2002-03 Stéphane GALLAND (under the GNU General Public License)