HTML_QuickForm2
[ class tree: HTML_QuickForm2 ] [ index: HTML_QuickForm2 ] [ all elements ]

Class: HTML_QuickForm2_Controller_SessionContainer

Source Location: /HTML_QuickForm2-2.1.0/HTML/QuickForm2/Controller/SessionContainer.php

Class Overview


Object wrapping around session variable used to store controller data


Author(s):

Version:

  • Release: 2.1.0

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 36]
Object wrapping around session variable used to store controller data

This is a bit less fragile than allowing to directly manipulate the array as was done in old HTML_QuickForm_Controller package



[ Top ]


Class Variables

$data =

[line 42]

A reference to a key in $_SESSION superglobal array
  • Access: protected

Type:   array


[ Top ]



Method Detail

__construct (Constructor)   [line 52]

HTML_QuickForm2_Controller_SessionContainer __construct( HTML_QuickForm2_Controller $controller)

Class constructor

Initializes a variable in $_SESSION array, its name is based upon the name of the Controller passed here

  • Access: public

Parameters:

HTML_QuickForm2_Controller   $controller   — 

[ Top ]

getDatasources   [line 141]

array getDatasources( )

Returns the controller data sources
  • Access: public

[ Top ]

getOpaque   [line 172]

mixed getOpaque( string $name)

Returns a user-supplied parameter
  • Access: public

Parameters:

string   $name   —  Parameter name

[ Top ]

getValidationStatus   [line 109]

bool getValidationStatus( string $pageId)

Returns the page validation status kept in session
  • Access: public

Parameters:

string   $pageId   —  Page ID

[ Top ]

getValues   [line 85]

array getValues( string $pageId)

Returns the page values kept in session
  • Access: public

Parameters:

string   $pageId   —  Page ID

[ Top ]

storeDatasources   [line 124]

void storeDatasources( array $datasources)

Stores the controller data sources
  • Throws: HTML_QuickForm2_InvalidArgumentException if given array contains something that is not a valid data source
  • Access: public

Parameters:

array   $datasources   —  A new data source list

[ Top ]

storeOpaque   [line 157]

void storeOpaque( string $name, string $value)

Stores some user-supplied parameter alongside controller data

It is sometimes useful to pass some additional user data between pages of the form, thus this method. Data added by this method will be removed alongside all the other data by HTML_QuickForm2_Controller::destroySessionContainer()

  • Access: public

Parameters:

string   $name   —  Parameter name
string   $value   —  Parameter value

[ Top ]

storeValidationStatus   [line 97]

void storeValidationStatus( string $pageId, bool $status)

Stores the page validation status
  • Access: public

Parameters:

string   $pageId   —  Page ID
bool   $status   —  Whether the page is valid

[ Top ]

storeValues   [line 73]

void storeValues( string $pageId, array $values)

Stores the page submit values
  • Access: public

Parameters:

string   $pageId   —  Page ID
array   $values   —  Page submit values

[ Top ]


Documentation generated on Wed, 10 Apr 2019 08:56:11 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.