Stud.IP  3.2 Revision
UserConfig Class Reference
Inheritance diagram for UserConfig:
Inheritance graph
Collaboration diagram for UserConfig:
Collaboration graph

Public Member Functions

 __construct ($user_id=null, $data=null)
 
 setUserId ($user_id)
 
 getUserId ()
 
 getValue ($field)
 
 setValue ($field, $value)
 
 unsetValue ($field)
 
 store ($field, $value)
 
 delete ($field)
 
- Public Member Functions inherited from Config
 __construct ($data=null)
 
 extractAllGlobal ()
 
 getFields ($range=null, $section=null, $name=null)
 
 getMetadata ($field)
 
 getValue ($field)
 
 setValue ($field, $value)
 
 getIterator ()
 
 __get ($field)
 
 __set ($field, $value)
 
 __isset ($field)
 
 offsetExists ($offset)
 
 offsetGet ($offset)
 
 offsetSet ($offset, $value)
 
 offsetUnset ($offset)
 
 count ()
 
 store ($field, $data)
 
 create ($field, $data=array())
 
 delete ($field)
 

Static Public Member Functions

static get ($user_id)
 
static set ($user_id, $my_instance)
 
- Static Public Member Functions inherited from Config
static get ()
 
static getInstance ()
 
static set ($my_instance)
 

Protected Member Functions

 fetchData ($data=null)
 
- Protected Member Functions inherited from Config
 fetchData ($data=null)
 

Additional Inherited Members

- Protected Attributes inherited from Config
 $data = array()
 
 $metadata = array()
 

Constructor & Destructor Documentation

◆ __construct()

__construct (   $user_id = null,
  $data = null 
)

passing null as first param is for compatibility and should be considered deprecated. passing data array as second param only for testing

Parameters
string$user_id
array$data
Here is the call graph for this function:

Member Function Documentation

◆ delete()

delete (   $field)
See also
lib/classes/Config::delete()
Here is the call graph for this function:

◆ fetchData()

fetchData (   $data = null)
protected
See also
lib/classes/Config::fetchData()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get()

static get (   $user_id)
static

returns cached instance for given user_id creates new objects if needed

Parameters
string$user_id
Returns
UserConfig

◆ getUserId()

getUserId ( )

returns the user id

Returns
string

◆ getValue()

getValue (   $field)

old style usage with $user_id, $key as params still works but is deprecated

See also
lib/classes/Config::getValue()
Here is the call graph for this function:

◆ set()

static set (   $user_id,
  $my_instance 
)
static

set cached instance for given user_id use for testing or to unset cached instance by passing null as second param

Parameters
string$user_id
UserConfig$my_instance
Here is the caller graph for this function:

◆ setUserId()

setUserId (   $user_id)

kept for compatibility, should be private

Deprecated:
Parameters
string$user_id
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setValue()

setValue (   $field,
  $value 
)

old style usage with $value, $user_id, $key as params still works but is deprecated

See also
lib/classes/Config::setValue()
Here is the call graph for this function:

◆ store()

store (   $field,
  $value 
)
See also
lib/classes/Config::store()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ unsetValue()

unsetValue (   $field)

old style usage with $user_id, $key as params still works but is deprecated

Parameters
string$field
Returns
bool
Here is the call graph for this function:

The documentation for this class was generated from the following file: