Stud.IP  3.1 Revision 48552
 All Data Structures Namespaces Files Functions Variables Groups Pages
VisibilitySettings Class Reference
Collaboration diagram for VisibilitySettings:
Collaboration graph

Public Member Functions

 __construct ()
 verify ($user_id, $owner_id, $visibility)
 getDescription ($stateid)
 getAllKeys ()
 getAllNames ()
 count ()

Static Public Member Functions

static getInstance ()

Data Fields

 $states = array()

Detailed Description

Groups all visibilitySettings

Constructor & Destructor Documentation

__construct ( )

On first construct we scan the visibilitySettings folder and load all applied visibilitySettings

Member Function Documentation

count ( )

Returns the number of possible states

Returns
type
getAllKeys ( )

Returns all keys of states

Returns
array all keys of states
getAllNames ( )

Returns all names of states

Returns
array all names of states
getDescription (   $stateid)

Get Description of a specific state

Parameters
int$stateidthe int representation
Returns
string State description
static getInstance ( )
static

I/O is expensive. Therefore we make the whole class sessionwide singleton to save some I/O.

Returns
VisibilitySettings The sessionwide visibilitySettings

Here is the caller graph for this function:

verify (   $user_id,
  $owner_id,
  $visibility 
)

Passthrou to the specified verify method

Parameters
string$user_idThe userid
string$owner_idThe owner of the visibility
int$visibilitythe visibilityID
Returns
boolean true if the user may see it, false if the user is not allowed to see

Field Documentation

$states = array()

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