|
static | find ($id) |
|
static | findByTimestamp ($timestamp) |
|
static | findNext ($timestamp=null) |
|
static | findCurrent () |
|
static | getAll ($force_reload=false) |
|
static | getAllAsArray ($with_before_first=true, $force_reload=false) |
|
static | tableScheme ($db_table) |
|
static | expireTableScheme () |
|
static | find ($id) |
|
static | exists ($id) |
|
static | countBySql ($sql=1, $params=[]) |
|
static | create ($data) |
|
static | build ($data, $is_new=true) |
|
static | buildExisting ($data) |
|
static | import ($data) |
|
static | findBySQL ($sql, $params=[]) |
|
static | findOneBySQL ($where, $params=[]) |
|
static | findThru ($foreign_key_value, $options) |
|
static | findEachBySQL ($callable, $sql, $params=[]) |
|
static | findMany ($pks=[], $order='', $order_params=[]) |
|
static | findEachMany ($callable, $pks=[], $order='', $order_params=[]) |
|
static | findAndMapBySQL ($callable, $where, $params=[]) |
|
static | findAndMapMany ($callable, $pks=[], $order='', $order_params=[]) |
|
static | deleteBySQL ($where, $params=[]) |
|
static | toObject ($id_or_object) |
|
static | __callStatic ($name, $arguments) |
|
◆ configure()
static configure |
( |
|
$config = [] | ) |
|
|
staticprotected |
Configures this model.
- Parameters
-
◆ find()
returns semester object for given id or null
- Parameters
-
- Returns
- NULL|Semester
◆ findByTimestamp()
static findByTimestamp |
( |
|
$timestamp | ) |
|
|
static |
returns Semester for given timestamp
- Parameters
-
- Returns
- null|Semester
◆ findCurrent()
◆ findNext()
static findNext |
( |
|
$timestamp = null | ) |
|
|
static |
returns following Semester for given timestamp
- Parameters
-
- Returns
- null|Semester
◆ getAll()
static getAll |
( |
|
$force_reload = false | ) |
|
|
static |
returns array of all existing semester objects orderd by begin
- Parameters
-
- Returns
- array
◆ getAllAsArray()
static getAllAsArray |
( |
|
$with_before_first = true , |
|
|
|
$force_reload = false |
|
) |
| |
|
static |
Returns a list of all semesters as array, optionally with an entry at the beginning that represents the time before the first semester in the system.
- Parameters
-
boolean | $with_before_first | Show the optional first entry as described above |
boolean | $force_reload | |
- Returns
- array
◆ getCorrectedVorlesBegin()
getCorrectedVorlesBegin |
( |
| ) |
|
Returns the corrected begin of lectures which ensures that the begin is always on a monday.
- Returns
- int unix timestamp of correct begin of lectures
◆ getcurrent()
Returns whether this semester is the current semester.
- Returns
- bool Indicating if this is the current semester
◆ getfirst_sem_week()
Returns the calendar week number of the first week of the lecture period.
- Returns
- int Calendar week number of the first week of lecture
◆ getlast_sem_week()
Returns the calendar week number of the last week of the lecture period.
- Returns
- int Calendar week number of the last week of lecture
◆ getpast()
Return whether this semester is in the past.
- Returns
- bool Indicating whether this semester is in the past
◆ getSemWeekNumber()
getSemWeekNumber |
( |
|
$timestamp | ) |
|
returns "Semesterwoche" for a given timestamp
- Parameters
-
- Returns
- number|boolean
◆ getStartWeeks()
getStartWeeks |
( |
|
$duration = false | ) |
|
Returns the start week dates for this semester (and other semesters if duration is > 0).
- Parameters
-
mixed | $duration | Duration time (false to restrict to current semester, -1 for indefinite duration, otherwise the int value for the duration so that semester start + duration = end) |
- Returns
- array containing the start weeks
◆ refreshCache()
Flushes the cache just after storing and deleting a semester
◆ seminar_counter()
seminar_counter |
( |
|
$field | ) |
|
|
protected |
Counts the number of different seminar types in this semester. This method caches the result in $seminar_counts so the db will only be queried once per semester.
- Parameters
-
String | $field | Name of the seminar (/additional_fields) type |
- Returns
- int The count of seminars of this type
◆ toArray()
toArray |
( |
|
$only_these_fields = null | ) |
|
Returns an array representation of this semester.
- Parameters
-
mixed | $only_these_fields | List of fields to extract |
- Returns
- array represenation
◆ $seminar_counts
The documentation for this class was generated from the following file: