ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
Password.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 2018 Nils Haagen <nils.haagen@concepts-and-training.de> Extended GPL, see docs/LICENSE */
3
4namespace ILIAS\Data;
5
14{
15
19 private $pass;
20
21 public function __construct($pass)
22 {
23 if (!is_string($pass)) {
24 throw new \InvalidArgumentException('Invalid value for $pass');
25 }
26 $this->pass = $pass;
27 }
28
34 public function toString()
35 {
36 return $this->pass;
37 }
38}
An exception for terminatinating execution or to throw for unit testing.
A password is used as part of credentials for authentication.
Definition: Password.php:14
toString()
Get the password-string.
Definition: Password.php:34