Class Flash

Description

Flash service

Purpose of this service is to make some data available across pages. Flash data is available on the next page but deleted when execution reach its end.

Usual use of Flash is to make possible that current page pass some data to the next one (for instance success or error message before HTTP redirect).

Flash service as a concep is taken from Rails. This thing really rocks!

  • version: 1.0

Located in /environment/classes/flash/Flash.class.php (line 17)


	
			
Method Summary
static FlashService &instance (void 0)
FlashService __construct (void 0)
void addVariable (string $var, mixed $value)
void clear (void 0)
mixed getVariable (string $var)
void removeVariable (string $var)
Methods
static method instance (line 134)

Return flash service instance

  • access: public
static FlashService &instance (void 0)
  • void 0
Constructor __construct (line 40)

Read flash data on construction

  • access: public
FlashService __construct (void 0)
  • void 0
addVariable (line 65)

Add specific variable to the flash. This variable will be available on the next page unlease removed with the removeVariable() or clear() method

  • access: public
void addVariable (string $var, mixed $value)
  • string $var: Variable name
  • mixed $value: Variable value
clear (line 91)

Call this function to clear flash. Note that data that previous page stored will not be deleted - just the data that this page saved for the next page

  • access: public
void clear (void 0)
  • void 0
getVariable (line 52)

Return specific variable from the flash. If value is not found NULL is returned

  • access: public
mixed getVariable (string $var)
  • string $var: Variable name
removeVariable (line 77)

Remove specific variable for the Flash

  • access: public
void removeVariable (string $var)
  • string $var: Name of the variable that need to be removed

Documentation generated on Wed, 23 Jan 2008 01:58:41 +0000 by phpDocumentor 1.4.0