PluginProbe
User Access Manager / 2.1.9
User Access Manager v2.1.9
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
user-access-manager / src / File / FileProtectionFactory.php

FileProtectionFactory.php in User Access Manager 2.1.9, at src/File/FileProtectionFactory.php

110 lines 2.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 */
15 namespace UserAccessManager\File;
16
17 use UserAccessManager\Config\MainConfig;
18 use UserAccessManager\Config\WordpressConfig;
19 use UserAccessManager\Util\Util;
20 use UserAccessManager\Wrapper\Php;
21 use UserAccessManager\Wrapper\Wordpress;
22
23 /**
24 * Class FileProtectionFactory
25 *
26 * @package UserAccessManager\FileHandler
27 */
28 class FileProtectionFactory
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 */
64 public function __construct(
65 Php $php,
66 Wordpress $wordpress,
67 WordpressConfig $wordpressConfig,
68 MainConfig $mainConfig,
69 Util $util
70 ) {
71 $this->php = $php;
72 $this->wordpress = $wordpress;
73 $this->wordpressConfig = $wordpressConfig;
74 $this->mainConfig = $mainConfig;
75 $this->util = $util;
76 }
77
78 /**
79 * Returns a new ApacheFileProtection object.
80 *
81 * @return ApacheFileProtection
82 */
83 public function createApacheFileProtection()
84 {
85 return new ApacheFileProtection(
86 $this->php,
87 $this->wordpress,
88 $this->wordpressConfig,
89 $this->mainConfig,
90 $this->util
91 );
92 }
93
94 /**
95 * Returns a new NginxFileProtection object.
96 *
97 * @return NginxFileProtection
98 */
99 public function createNginxFileProtection()
100 {
101 return new NginxFileProtection(
102 $this->php,
103 $this->wordpress,
104 $this->wordpressConfig,
105 $this->mainConfig,
106 $this->util
107 );
108 }
109 }
110