Horde_Variables:: class. Provides OO-way to access form variables.
Copyright 2009-2012 Horde LLC (http://www.horde.org/)
See the enclosed file COPYING for license information (LGPL). If you
did not receive this file, see http://www.horde.org/licenses/lgpl21.
Methods summary
public static
Horde_Variables
|
#
getDefaultVariables( string $sanitize = false )
Returns a Horde_Variables object populated with the form input.
Returns a Horde_Variables object populated with the form input.
Parameters
- $sanitize
- Sanitize the input variables?
Returns
|
public
|
#
__construct( array $vars = array(), string $sanitize = false )
Constructor.
Parameters
- $vars
- <p>The list of form variables (if null, defaults
to PHP's $_REQUEST value).</p>
- $sanitize
- Sanitize the input variables?
|
public
|
|
public
|
|
public
boolean
|
#
__isset( string $varname )
isset() implementation.
Parameters
- $varname
- The form variable name.
Returns
boolean Does $varname form variable exist?
|
public
|
#
offsetExists( mixed $field )
Implements isset() for ArrayAccess interface.
Implements isset() for ArrayAccess interface.
See
Implementation of
ArrayAccess::offsetExists()
|
public
mixed
|
#
get( string $varname, string $default = null )
Returns the value of a given form variable.
Returns the value of a given form variable.
Parameters
- $varname
- The form variable name.
- $default
- The default form variable value.
Returns
mixed The form variable, or $default if it doesn't exist.
|
public
mixed
|
#
__get( string $varname )
Returns the value of a given form variable.
Returns the value of a given form variable.
Parameters
- $varname
- The form variable name.
Returns
mixed The form variable, or null if it doesn't exist.
|
public
|
#
offsetGet( mixed $field )
Implements getter for ArrayAccess interface.
Implements getter for ArrayAccess interface.
See
Implementation of
ArrayAccess::offsetGet()
|
public
mixed
|
#
getExists( string $varname, boolean & $exists )
Given a variable name, returns the value and sets a variable indicating
whether the value exists in the form data.
Given a variable name, returns the value and sets a variable indicating
whether the value exists in the form data.
Parameters
- $varname
- The form variable name.
- $exists
- <p>$exists Reference to variable that will indicate
whether $varname existed in form data.</p>
Returns
mixed The form variable, or null if it doesn't exist.
|
public
|
#
set( mixed $varname, mixed $value )
Sets the value of a given form variable.
Sets the value of a given form variable.
See
|
public
|
#
__set( string $varname, mixed $value )
Sets the value of a given form variable.
Sets the value of a given form variable.
Parameters
- $varname
- The form variable name.
- $value
- The value to set.
|
public
|
#
offsetSet( mixed $field, mixed $value )
Implements setter for ArrayAccess interface.
Implements setter for ArrayAccess interface.
See
Implementation of
ArrayAccess::offsetSet()
|
public
|
#
remove( mixed $varname )
Deletes a given form variable.
Deletes a given form variable.
See
|
public
|
#
__unset( string $varname )
Deletes a given form variable.
Deletes a given form variable.
Parameters
- $varname
- The form variable name.
|
public
|
#
offsetUnset( mixed $field )
Implements unset() for ArrayAccess interface.
Implements unset() for ArrayAccess interface.
See
Implementation of
ArrayAccess::offsetUnset()
|
public
|
#
merge( array $vars )
Merges a list of variables into the current form variable list.
Merges a list of variables into the current form variable list.
Parameters
|
public
boolean
|
#
add( string $varname, mixed $value )
Set $varname to $value ONLY if it's not already present.
Set $varname to $value ONLY if it's not already present.
Parameters
- $varname
- The form variable name.
- $value
- The value to set.
Returns
boolean True if the value was altered.
|
public
mixed
|
#
filter( string $varname )
Filters a form value so that it can be used in HTML output.
Filters a form value so that it can be used in HTML output.
Parameters
- $varname
- The form variable name.
Returns
mixed The filtered variable, or null if it doesn't exist.
Since
Horde_Util 1.2.0
|
public
|
#
count( )
Implementation of
Countable::count()
|
public
|
#
current( )
Implementation of
Iterator::current()
|
public
|
#
key( )
Implementation of
Iterator::key()
|
public
|
#
next( )
Implementation of
Iterator::next()
|
public
|
#
rewind( )
Implementation of
Iterator::rewind()
|
public
|
#
valid( )
Implementation of
Iterator::valid()
|