ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilSetupConfig.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 2019 Richard Klees <richard.klees@concepts-and-training.de> Extended GPL, see docs/LICENSE */
4
7
8class ilSetupConfig implements Setup\Config
9{
13 protected $client_id;
14
19
24
28 protected $register_nic;
29
30 public function __construct(
31 string $client_id,
33 \DateTimeZone $server_timezone,
34 bool $register_nic
35 ) {
36 if (!preg_match("/^[A-Za-z0-9]+$/", $client_id)) {
37 throw new \InvalidArgumentException(
38 "client_id must not be empty and may only contain alphanumeric characters"
39 );
40 }
41 $this->client_id = $client_id;
42 $this->master_password = $master_password;
43 $this->server_timezone = $server_timezone;
44 $this->register_nic = $register_nic;
45 }
46
47 public function getClientId() : string
48 {
49 return $this->client_id;
50 }
51
52 public function getMasterPassword() : Password
53 {
55 }
56
57 public function getServerTimeZone() : \DateTimeZone
58 {
60 }
61
62 public function getRegisterNIC() : bool
63 {
65 }
66}
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
__construct(string $client_id, Password $master_password, \DateTimeZone $server_timezone, bool $register_nic)
A configuration for the setup.
Definition: Config.php:11