Stud.IP  6.0
RangeFactory Class Reference

Static Public Member Functions

const static find (string $id, array $search_types=['sem', 'user', 'inst', 'fak'])
 
static createRange (string $type, string $id)
 

Data Fields

const TYPE_MAPPING
 

Detailed Description

Factory for ranges.

Author
Jan-Hendrik Willms tleil.nosp@m.ax+s.nosp@m.tudip.nosp@m.@gma.nosp@m.il.co.nosp@m.m GPL2 or any later version
Since
Stud.IP 4.1

Member Function Documentation

◆ createRange()

static createRange ( string  $type,
string  $id 
)
static

Create a range by given type and id.

Parameters
string$typeRange type
mixed$idRange id
Returns
Range any of the supported range types
Exceptions
Exceptionwhen an invalid range type was given

◆ find()

const static find ( string  $id,
array  $search_types = ['sem',
'user'  ,
'inst'  ,
'fak']   
)
static

Finds a Range for a given id or false if there is no Range with the id.

Parameters
string$idRange id
array$search_typesarray can have values of 'sem', 'user', 'inst' and/or 'fak'
Returns
Range|false

Field Documentation

◆ TYPE_MAPPING

const TYPE_MAPPING
Initial value:
= [
'sem' => 'course'

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