diff options
| author | Philipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de> | 2024-09-24 10:53:31 +0200 |
|---|---|---|
| committer | Philipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de> | 2024-09-24 10:53:31 +0200 |
| commit | 4459dd7917f4d1c34f40bb68f0e991e9c3d53e4c (patch) | |
| tree | 5c07151ae61276d334e88f6309c30d439a85c12e /lib/plugins/core/Role.php | |
| parent | da0022e5c1abbf9825ae76debaabdff7e8623bb4 (diff) | |
| parent | 97a188592c679890a25c37ab78463add76a52ff7 (diff) | |
Merge branch 'main' into issue-3911issue-3911
Diffstat (limited to 'lib/plugins/core/Role.php')
| -rw-r--r-- | lib/plugins/core/Role.php | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/lib/plugins/core/Role.php b/lib/plugins/core/Role.php new file mode 100644 index 0000000..91e00e8 --- /dev/null +++ b/lib/plugins/core/Role.php @@ -0,0 +1,89 @@ +<?php +/** + * Role.php + * + * @author Dennis Reil <dennis.reil@offis.de> + * @author Michael Riehemann <michael.riehemann@uni-oldenburg.de> + * @package pluginengine + * @subpackage core + * @copyright 2009 Stud.IP + * @license http://www.gnu.org/licenses/gpl.html GPL Licence 3 + */ +class Role +{ + const UNKNOWN_ROLE_ID = null; + + public $roleid; + public $rolename; + public $systemtype; + + /** + * Constructor + */ + public function __construct($id = self::UNKNOWN_ROLE_ID, $name = '', $system = false) + { + $this->setRoleid($id); + $this->setRolename($name); + $this->setSystemtype($system); + } + + /** + * Returns the role's id. + * + * @return int + */ + public function getRoleid() + { + return $this->roleid; + } + + /** + * Set the role's id. + * + * @param int $newid + */ + public function setRoleid($newid) + { + $this->roleid = $newid; + } + + /** + * Returns the role's name. + * + * @return string + */ + public function getRolename() + { + return $this->rolename; + } + + /** + * Set the role's name. + * + * @param string $newrole + */ + public function setRolename($newrole) + { + $this->rolename = $newrole; + } + + /** + * Returns whether the role is a system role. + * + * @return boolean + */ + public function getSystemtype() + { + return $this->systemtype; + } + + /** + * Sets whether the role is a system role. + * + * @param boolean $newtype + */ + public function setSystemtype($newtype) + { + $this->systemtype = (bool) $newtype; + } +} |
