diff options
| author | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-03-12 07:16:23 +0200 |
|---|---|---|
| committer | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-03-12 07:16:23 +0200 |
| commit | 7076343338ae3439f3c86f01144818abe8c31978 (patch) | |
| tree | 794abb1e6b8f821091fd095341885496b6dad51d /core/classes/authenticator/User.php | |
| parent | 47cbb529f5723b246125ae083a193e11481b89ef (diff) | |
| download | classroom-7076343338ae3439f3c86f01144818abe8c31978.tar.gz classroom-7076343338ae3439f3c86f01144818abe8c31978.tar.bz2 classroom-7076343338ae3439f3c86f01144818abe8c31978.zip | |
add container helpers; constuct public directory-tree
Diffstat (limited to 'core/classes/authenticator/User.php')
| -rw-r--r-- | core/classes/authenticator/User.php | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/core/classes/authenticator/User.php b/core/classes/authenticator/User.php new file mode 100644 index 0000000..b99fa70 --- /dev/null +++ b/core/classes/authenticator/User.php @@ -0,0 +1,102 @@ +<?php + + +// namespace DevCoder\Authentication; + +class User implements UserInterface +{ + + // @var string + private $userName; + + // @var string + private $password; + + // @var array + private $roles = []; + + // @var bool + private $enabled = true; + + + /** GETs + * ------------------------------------------------------------------------- + */ + + /** getUserName + * @return null|string + */ + public function getUsername(): ?string + { + return $this->userName; + } + + /** getPassword + * @return null|string + */ + public function getPassword(): ?string + { + return $this->password; + } + + /** getRoles + * @return array + */ + public function getRoles(): array + { + return $this->roles; + } + + /** isEnabled + * @return bool + */ + public function isEnabled(): bool + { + return $this->enabled; + } + + + /** SETs + * ------------------------------------------------------------------------- + */ + + /** setUserName + * @param string $userName + * @return User + */ + public function setUserName(string $userName): self + { + $this->userName = $userName; + return $this; + } + + /** setPassword + * @param string $password + * @return User + */ + public function setPassword(string $password): self + { + $this->password = $password; + return $this; + } + + /** setRoles + * @param array $roles + * @return User + */ + public function setRoles(array $roles): self + { + $this->roles = $roles; + return $this; + } + + /** + * @param bool $enabled + * @return User + */ + public function setEnabled(bool $enabled): self + { + $this->enabled = $enabled; + return $this; + } +} |
