PluginProbe
authLdap / 3.1.2
authLdap v3.1.2
trunk 2.5.3 2.5.3-RC3 2.5.4 2.5.6 2.5.7 2.5.8 2.5.9 2.6.0 2.6.1 2.6.2 2.6.3 2.6.4 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4
authldap / src / OptionFactory.php

OptionFactory.php in authLdap 3.1.2, at src/OptionFactory.php

28 lines 470 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Copyright Andreas Heigl <andreas@heigl.org>
5 *
6 * Licensed under the MIT-license. For details see the included file LICENSE.md
7 */
8
9 declare(strict_types=1);
10
11 namespace Org_Heigl\AuthLdap;
12
13 use function json_decode;
14
15 class OptionFactory
16 {
17 public function fromJson(string $json): Options
18 {
19 $option = new Options();
20 $content = json_decode($json, true);
21 foreach ($content as $key => $value) {
22 $option->set($key, $value);
23 }
24
25 return $option;
26 }
27 }
28