diff options
| author | Jan-Hendrik Willms <tleilax+github@gmail.com> | 2021-07-22 16:07:19 +0200 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+github@gmail.com> | 2021-07-22 16:19:12 +0200 |
| commit | a3da1483a9e689846179159355badfec8073dbec (patch) | |
| tree | 770dcca6bdf5f6f2a11b0e7fcbbeda6919a3fc52 /lib/classes/Range.interface.php | |
current code from svn, revision 62608
Diffstat (limited to 'lib/classes/Range.interface.php')
| -rw-r--r-- | lib/classes/Range.interface.php | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/lib/classes/Range.interface.php b/lib/classes/Range.interface.php new file mode 100644 index 0000000..aa4c9cf --- /dev/null +++ b/lib/classes/Range.interface.php @@ -0,0 +1,60 @@ +<?php +/** + * Generic range interface. Ranges may be a lot of things in Stud.IP. + * + * @author Jan-Hendrik Willms <tleilax+studip@gmail.com> + * @license GPL2 or any later version + */ +interface Range +{ + /** + * Returns a descriptive text for the range type. + * + * @return string + */ + public function describeRange(); + + /** + * Returns a unique identificator for the range type. + * + * @return string + */ + public function getRangeType(); + + /** + * Returns the id of the current range + * + * @return mixed (string|int) + */ + public function getRangeId(); + + /** + * Returns the full name of the range (in given format). + * + * @param string $format + * @return string + */ + public function getFullname($format = 'default'); + + /** + * Returns the configuration object for this range. + * @return RangeConfig + */ + public function getConfiguration(); + + /** + * Decides whether the user may access the range. + * + * @param string|null $user_id Optional id of a user, defaults to current user + * @return bool + */ + public function isAccessibleToUser($user_id = null); + + /** + * Decides whether the user may edit/alter the range. + * + * @param string|null $user_id Optional id of a user, defaults to current user + * @return bool + */ + public function isEditableByUser($user_id = null); +} |
