PluginProbe
User Access Manager / 2.1.11
User Access Manager v2.1.11
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 +74 -10 2.3.16 → 2.1.11 View file →
@@ -1,8 +1,18 @@
1 1 <?php
2 -
3 -declare(strict_types=1);
4 -
2 +/**
3 + * FileProtectionFactory.php
4 + *
5 + * The FileProtectionFactory class file.
6 + *
7 + * PHP versions 5
8 + *
9 + * @author Alexander Schneider <[email protected]>
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 + */
5 15 namespace UserAccessManager\File;
6 16
7 17 use UserAccessManager\Config\MainConfig;
8 18 use UserAccessManager\Config\WordpressConfig;
@@ -9,20 +19,69 @@
9 19 use UserAccessManager\Util\Util;
10 20 use UserAccessManager\Wrapper\Php;
11 21 use UserAccessManager\Wrapper\Wordpress;
12 22
23 +/**
24 + * Class FileProtectionFactory
25 + *
26 + * @package UserAccessManager\FileHandler
27 + */
13 28 class FileProtectionFactory
14 29 {
30 + /**
31 + * @var Php
32 + */
33 + private $php;
34 +
35 + /**
36 + * @var Wordpress
37 + */
38 + private $wordpress;
39 +
40 + /**
41 + * @var WordpressConfig
42 + */
43 + private $wordpressConfig;
44 +
45 + /**
46 + * @var MainConfig
47 + */
48 + private $mainConfig;
49 +
50 + /**
51 + * @var Util
52 + */
53 + private $util;
54 +
55 + /**
56 + * FileProtectionFactory constructor.
57 + *
58 + * @param Php $php
59 + * @param Wordpress $wordpress
60 + * @param WordpressConfig $wordpressConfig
61 + * @param MainConfig $mainConfig
62 + * @param Util $util
63 + */
15 64 public function __construct(
16 - private Php $php,
17 - private Wordpress $wordpress,
18 - private WordpressConfig $wordpressConfig,
19 - private MainConfig $mainConfig,
20 - private Util $util
65 + Php $php,
66 + Wordpress $wordpress,
67 + WordpressConfig $wordpressConfig,
68 + MainConfig $mainConfig,
69 + Util $util
21 70 ) {
71 + $this->php = $php;
72 + $this->wordpress = $wordpress;
73 + $this->wordpressConfig = $wordpressConfig;
74 + $this->mainConfig = $mainConfig;
75 + $this->util = $util;
22 76 }
23 77
24 - public function createApacheFileProtection(): ApacheFileProtection
78 + /**
79 + * Returns a new ApacheFileProtection object.
80 + *
81 + * @return ApacheFileProtection
82 + */
83 + public function createApacheFileProtection()
25 84 {
26 85 return new ApacheFileProtection(
27 86 $this->php,
28 87 $this->wordpress,
@@ -31,9 +90,14 @@
31 90 $this->util
32 91 );
33 92 }
34 93
35 - public function createNginxFileProtection(): NginxFileProtection
94 + /**
95 + * Returns a new NginxFileProtection object.
96 + *
97 + * @return NginxFileProtection
98 + */
99 + public function createNginxFileProtection()
36 100 {
37 101 return new NginxFileProtection(
38 102 $this->php,
39 103 $this->wordpress,