Stud.IP  6.0
VisibilitySettings Class Reference

Public Member Functions

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

Static Public Member Functions

static getInstance ()
 

Data Fields

 $states = []
 

Static Public Attributes

static $CLASSES
 

Detailed Description

Groups all visibilitySettings

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

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

Member Function Documentation

◆ count()

count ( )

Returns the number of possible states

Returns
type

◆ getAllKeys()

getAllKeys ( )

Returns all keys of states

Returns
array all keys of states

◆ getAllNames()

getAllNames ( )

Returns all names of states

Returns
array all names of states

◆ getDescription()

getDescription (   $stateid)

Get Description of a specific state

Parameters
int$stateidthe int representation
Returns
string State description

◆ getInstance()

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

◆ verify()

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

◆ $CLASSES

$CLASSES
static
Initial value:
= [
'Visibility_Me',
'Visibility_Buddies',
'Visibility_Domain',
'Visibility_Studip',
'Visibility_Extern'
]

◆ $states

$states = []

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