PluginProbe
User Access Manager / 2.2.21
User Access Manager v2.2.21
2.3.20 2.3.19 2.3.18 2.3.17 2.3.16 2.3.15 2.3.14 2.3.13 trunk 0.6 0.6.1 0.6.2 0.7 0.7 Beta 0.7.0.1 0.8 0.8.0.1 0.8.0.2 0.9 0.9.1 0.9.1.1 0.9.1.2 0.9.1.3 0.9.1.4 1.0 All 136 releases
← All changes | src/File/FileProtectionFactory.php +69 -5 2.3.152.2.21 View file →
@@ -1,5 +1,18 @@
1 1 <?php
2 +/**
3 + * FileProtectionFactory.php
4 + *
5 + * The FileProtectionFactory class file.
6 + *
7 + * PHP versions 5
8 + *
9 + * @author Alexander Schneider <alexanderschneider85@gmail.com>
10 + * @copyright 2008-2017 Alexander Schneider
11 + * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2
12 + * @version SVN: $id$
13 + * @link http://wordpress.org/extend/plugins/user-access-manager/
14 + */
2 15
3 16 declare(strict_types=1);
4 17
5 18 namespace UserAccessManager\File;
@@ -9,19 +22,66 @@
9 22 use UserAccessManager\Util\Util;
10 23 use UserAccessManager\Wrapper\Php;
11 24 use UserAccessManager\Wrapper\Wordpress;
12 25
26 +/**
27 + * Class FileProtectionFactory
28 + *
29 + * @package UserAccessManager\FileHandler
30 + */
13 31 class FileProtectionFactory
14 32 {
33 + /**
34 + * @var Php
35 + */
36 + private $php;
37 +
38 + /**
39 + * @var Wordpress
40 + */
41 + private $wordpress;
42 +
43 + /**
44 + * @var WordpressConfig
45 + */
46 + private $wordpressConfig;
47 +
48 + /**
49 + * @var MainConfig
50 + */
51 + private $mainConfig;
52 +
53 + /**
54 + * @var Util
55 + */
56 + private $util;
57 +
58 + /**
59 + * FileProtectionFactory constructor.
60 + * @param Php $php
61 + * @param Wordpress $wordpress
62 + * @param WordpressConfig $wordpressConfig
63 + * @param MainConfig $mainConfig
64 + * @param Util $util
65 + */
15 66 public function __construct(
16 - private Php $php,
17 - private Wordpress $wordpress,
18 - private WordpressConfig $wordpressConfig,
19 - private MainConfig $mainConfig,
20 - private Util $util
67 + Php $php,
68 + Wordpress $wordpress,
69 + WordpressConfig $wordpressConfig,
70 + MainConfig $mainConfig,
71 + Util $util
21 72 ) {
73 + $this->php = $php;
74 + $this->wordpress = $wordpress;
75 + $this->wordpressConfig = $wordpressConfig;
76 + $this->mainConfig = $mainConfig;
77 + $this->util = $util;
22 78 }
23 79
80 + /**
81 + * Returns a new ApacheFileProtection object.
82 + * @return ApacheFileProtection
83 + */
24 84 public function createApacheFileProtection(): ApacheFileProtection
25 85 {
26 86 return new ApacheFileProtection(
27 87 $this->php,
@@ -31,8 +91,12 @@
31 91 $this->util
32 92 );
33 93 }
34 94
95 + /**
96 + * Returns a new NginxFileProtection object.
97 + * @return NginxFileProtection
98 + */
35 99 public function createNginxFileProtection(): NginxFileProtection
36 100 {
37 101 return new NginxFileProtection(
38 102 $this->php,