Zend Framework  3.0
Public Member Functions | Protected Attributes | List of all members
Variables Class Reference

Class for Zend to help enforce private constructs. More...

Public Member Functions

 __construct (array $variables=[], array $options=[])
 Constructor.
 
 setOptions (array $options)
 Configure object.
 
 setStrictVars ($flag)
 Set status of "strict vars" flag.
 
 isStrict ()
 Are we operating with strict variables?
 
 assign ($spec)
 Assign many values at once.
 
 offsetGet ($key)
 Get the variable value.
 
 clear ()
 Clear all variables.
 

Protected Attributes

 $strictVars = false
 

Detailed Description

Class for Zend to help enforce private constructs.

Todo:

Allow specifying string names for manager, filter chain, variables

Move escaping into variables object

Move strict variables into variables object

Constructor & Destructor Documentation

__construct ( array  $variables = [],
array  $options = [] 
)

Constructor.

Parameters
array$variables
array$options

Member Function Documentation

assign (   $spec)

Assign many values at once.

Parameters
array | object$spec
Returns
Variables
Exceptions
Exception\InvalidArgumentException
clear ( )

Clear all variables.

Returns
void
isStrict ( )

Are we operating with strict variables?

Returns
bool
offsetGet (   $key)

Get the variable value.

If the value has not been defined, a null value will be returned; if strict vars on in place, a notice will also be raised.

Otherwise, returns _escaped_ version of the value.

Parameters
mixed$key
Returns
mixed
setOptions ( array  $options)

Configure object.

Parameters
array$options
Returns
Variables
setStrictVars (   $flag)

Set status of "strict vars" flag.

Parameters
bool$flag
Returns
Variables

Member Data Documentation

$strictVars = false
protected