Class mr_var

Description

MR Var

Variable storage class. Very similar to Zend_Registry (http://framework.zend.com/manual/en/zend.registry.html).

This does not replace the session nor does it replace mr_cache. This is a per PHP execution storage of variables.

Note: index "mrconfig" is automatically set to the config for local/mr/framework. Please do not overrite with something else.

  • author: Mark Nielsen
  • todo: implement ArrayAccess

Located in /var.php (line 42)

stdClass
   |
   --mr_var
Method Summary
static mr_var instance ()
mr_var __construct ([array $init = array()])
mr_var exists (string $index)
mr_var get (string $index)
mr_var remove (string $index)
mr_var set (mixed $param)
Methods
static instance (line 56)

Get the global static instance of mr_var

  • access: public
static mr_var instance ()
Constructor __construct (line 74)

Setup with initial values

  • access: public
mr_var __construct ([array $init = array()])
  • array $init: Initial values
exists (line 126)

Check if an index exists

  • access: public
mr_var exists (string $index)
  • string $index: The index to check
get (line 113)

Get a value at index

  • todo: allow the passing of a default?
  • throws: coding_exception
  • access: public
mr_var get (string $index)
  • string $index: The index's value to fetch
remove (line 136)

Unset an index

  • access: public
mr_var remove (string $index)
  • string $index: The index to unset
set (line 85)

Set values

  • throws: coding_exception
  • access: public
mr_var set (mixed $param)
  • mixed $param: Pass an array(name => value, etc) or ($name, $value)

Documentation generated on Thu, 28 Jun 2012 16:33:53 -0700 by phpDocumentor 1.4.3