SourceForge.net LogoPHPGallue
[ class tree: libbase ] [ index: libbase ] [ all elements ]

Class: GALDescriptor

Source Location: /libbase/globalvars.inc.php

Class Overview

GALVariable
   |
   --GALDescriptor

An extension of GALVariable that adds a name property and reading from GET, POST or COOKIE data.


Variables

Constants

Methods


Inherited Constants

Inherited Variables

Inherited Methods

Class: GALVariable

GALVariable::__construct()
Initializes a GALVariable.
GALVariable::check()
Checks and filters the given value if it's valid for this variable.
GALVariable::get()
Returns the vlue of this variable.
GALVariable::set()
Sets the value of this variable.

Class Details

[line 134]
An extension of GALVariable that adds a name property and reading from GET, POST or COOKIE data.



[ Top ]


Class Variables

$_name =  ""

[line 161]

This variable's name.

It is used to read this variable's value from GET, POST or COOKIE data.




Tags:

access:  protected

Type:   string


[ Top ]

$_sources = array()

[line 155]

The sources of this variable.

Either one of GALDescriptor::GET, GALDescriptor::POST or GALDescriptor::COOKIE, or an array containing GALDescriptor::GET, GALDescriptor::POST or GALDescriptor::COOKIE in the right order if a variable is read from multiple sources. A source with lower index has a higher priority.




Tags:

access:  protected

Type:   mixed


[ Top ]



Class Methods


method evaluate [line 213]

void evaluate( array &$getvars, array &$postvars, array &$cookievars)

Try to read this variable's value from the given GET, POST and COOKIE values.

This method tries to read this variable's value according to the sources in GALDescriptor::sources. If this isn't possible, the default value is used.




Tags:

throws:  GAL_EGlobalVars


Parameters:

array   &$getvars   Typically global $_GET variable.
array   &$postvars   Typically global $_POST variable.
array   &$cookievars   Typically global $_COOKIE variable.

[ Top ]

constructor __construct [line 171]

GALDescriptor __construct( string $name, mixes $sources, mixed $range, mixed $value, mixed $default)

Initializes a GALDescriptor object.



Tags:



Overrides GALVariable::__construct() (Initializes a GALVariable.)

Parameters:

string   $name   The variable's name.
mixes   $sources   This variable's sources, either one of GALDescriptor::GET, GALDescriptor::POST or GALDescriptor::COOKIE or an array containing values of GALDescriptor::GET, GALDescriptor::POST or GALDescriptor::COOKIE.
mixed   $range   For parent constructor.
mixed   $value   For parent constructor.
mixed   $default   For parent constructor.

[ Top ]

method __get [line 185]

mixed __get( string $name)

Magic method to access the "name" and "value" properties.

This method provides access to the "virtual" properties "name" and "value".




Tags:

return:  The name or the value of this variable.
throws:  GAL_EProperty


Parameters:

string   $name   The propertie's name, either "name" or "value".

[ Top ]


Class Constants

COOKIE =  2

[line 147]

Indicates that a value is transmitted with a cookie.


[ Top ]

GET =  0

[line 139]

Indicates that a value is transmitted with GET.


[ Top ]

POST =  1

[line 143]

Indicates that a value is transmitted with POST.


[ Top ]



Documentation generated on Wed, 16 Aug 2006 15:36:06 +0200 by phpDocumentor 1.3.0RC6