Stud.IP  2.0 Revision 48548
 All Data Structures Namespaces Files Functions Variables Pages
Config Class Reference
Inheritance diagram for Config:
Inheritance graph
Collaboration diagram for Config:
Collaboration graph

Public Member Functions

 __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 ()
static getInstance ()
static set ($my_instance)

Protected Member Functions

 fetchData ($data=null)

Protected Attributes

 $data = array()
 $metadata = array()

Constructor & Destructor Documentation

__construct (   $data = null)

pass array of config entries in field => value pairs to circumvent fetching from database

Parameters
array$data

Here is the call graph for this function:

Member Function Documentation

__get (   $field)

magic method for dynamic properties

Here is the call graph for this function:

__isset (   $field)

magic method for dynamic properties

__set (   $field,
  $value 
)

magic method for dynamic properties

Here is the call graph for this function:

count ( )

Countable

Here is the caller graph for this function:

create (   $field,
  $data = array() 
)

creates a new config entry in database

Parameters
stringname of entry
arraydata to insert as assoc array
Exceptions
InvalidArgumentException
Returns
Ambigous <NULL, ConfigEntry>

Here is the call graph for this function:

delete (   $field)

delete config entry from database

Parameters
stringname of entry
Exceptions
InvalidArgumentException
Returns
integer number of deleted rows

Reimplemented in UserConfig.

Here is the call graph for this function:

extractAllGlobal ( )

export all global config entries into global namespace

Here is the call graph for this function:

fetchData (   $data = null)
protected

fetch config data from table config pass array to override database access

Parameters
array$data

Reimplemented in UserConfig.

Here is the call graph for this function:

Here is the caller graph for this function:

static get ( )
static

returns singleton instance

Returns
Config

Here is the caller graph for this function:

getFields (   $range = null,
  $section = null,
  $name = null 
)

returns a list of config entry names, filtered by given params

Parameters
stringfilter by range: global or user
stringfilter by section
stringfilter by part of name
Returns
array

Here is the call graph for this function:

Here is the caller graph for this function:

static getInstance ( )
static

alias of Config::get() for compatibility

Returns
Config

Here is the call graph for this function:

Here is the caller graph for this function:

getIterator ( )
getMetadata (   $field)

returns metadata for config entry

Parameters
srting$field
Returns
array
getValue (   $field)

returns value of config entry for compatibility reasons an existing variable in global namespace with the same name is also returned

Parameters
string$field
Returns
Ambigous

Reimplemented in UserConfig.

Here is the caller graph for this function:

offsetExists (   $offset)

ArrayAccess: Check whether the given offset exists.

offsetGet (   $offset)

ArrayAccess: Get the value at the given offset.

offsetSet (   $offset,
  $value 
)

ArrayAccess: Set the value at the given offset.

offsetUnset (   $offset)

ArrayAccess: unset the value at the given offset (not applicable)

static set (   $my_instance)
static

use to set singleton instance for testing or to unset by passing null

Parameters
Config$my_instance
setValue (   $field,
  $value 
)

set config entry to given value, but don't store it in database

Parameters
string$field
unknown_type$value
Returns

Reimplemented in UserConfig.

Here is the caller graph for this function:

store (   $field,
  $data 
)

store new value for existing config entry in database posts notification ConfigValueChanged if entry is changed

Parameters
string$field
string$data
Exceptions
InvalidArgumentException
Returns
boolean

Reimplemented in UserConfig.

Here is the call graph for this function:

Field Documentation

$data = array()
protected
$metadata = array()
protected

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