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

Public Member Functions

 __construct ($data)
 countSeminars ()
 store ()
 delete ()
 set ($offset, $value)
 getClass ()
 offsetSet ($offset, $value)
 offsetGet ($offset)
 offsetExists ($offset)
 offsetUnset ($offset)

Static Public Member Functions

static getTypes ()
static refreshTypes ()

Protected Attributes

 $data = array()

Static Protected Attributes

static $sem_types = null

Detailed Description

Class to define and manage attributes of seminar types. Usually all sem-types are stored in a global variable $SEM_TYPE which is an array of SemType objects.

SemType::getTypes() gets you all seminar types in an array.

This class only represents the name of the type and gives a relation to a sem_class.

Constructor & Destructor Documentation

__construct (   $data)

Constructor can be set with integer of sem_class_id or an array of the old $SEM_CLASS style.

Parameters
integer  |  array$data

Here is the call graph for this function:

Member Function Documentation

countSeminars ( )

Returns the number of seminars of this sem_type in Stud.IP

Returns
integer

Here is the call graph for this function:

Here is the caller graph for this function:

delete ( )

Deletes the sem_type-object. Will only delete, if there are no seminars in this sem_type. Remember to refresh the global $SEM_TYPE array.

Returns
boolean : success of deletion

Here is the call graph for this function:

getClass ( )

Here is the caller graph for this function:

static getTypes ( )
static

Returns an array of all SemTypes in Stud.IP. Equivalent to global $SEM_TYPE variable. This variable is statically stored in this class.

Returns
array of SemType

Here is the call graph for this function:

Here is the caller graph for this function:

offsetExists (   $offset)

ArrayAccess method to check if an attribute exists.

Parameters
type$offset
Returns
type
offsetGet (   $offset)

Compatibility function with old $SEM_TYPE variable for plugins. Maps the new array-structure to the old boolean values.

Parameters
integer$offset,:name of attribute
Returns
boolean|(localized)string

Here is the call graph for this function:

offsetSet (   $offset,
  $value 
)

deprecated, does nothing, should not be used

Parameters
string$offset
mixed$value
offsetUnset (   $offset)

deprecated, does nothing, should not be used

Parameters
string$offset
static refreshTypes ( )
static

Here is the call graph for this function:

Here is the caller graph for this function:

set (   $offset,
  $value 
)

Sets an attribute of sem_type->data

Parameters
string$offset
mixed$value
store ( )

stores all data in the database

Returns
boolean success

Here is the call graph for this function:

Field Documentation

$data = array()
protected
$sem_types = null
staticprotected

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