PluginProbe
User Access Manager / 2.2.14
User Access Manager v2.2.14
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 / FileProtectionInterface.php

FileProtectionInterface.php in User Access Manager 2.2.14, at src/File/FileProtectionInterface.php

72 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * FileProtectionInterface.php
4 *
5 * The FileProtectionInterface interface 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
16 declare(strict_types=1);
17
18 namespace UserAccessManager\File;
19
20 use UserAccessManager\Config\MainConfig;
21 use UserAccessManager\Config\WordpressConfig;
22 use UserAccessManager\Util\Util;
23 use UserAccessManager\Wrapper\Php;
24 use UserAccessManager\Wrapper\Wordpress;
25
26 /**
27 * Interface FileProtectionInterface
28 *
29 * @package UserAccessManager\FileProtection
30 */
31 interface FileProtectionInterface
32 {
33 /**
34 * FileProtectionInterface constructor.
35 * @param Php $php
36 * @param Wordpress $wordpress
37 * @param WordpressConfig $wordpressConfig
38 * @param MainConfig $mainConfig
39 * @param Util $util
40 */
41 public function __construct(
42 Php $php,
43 Wordpress $wordpress,
44 WordpressConfig $wordpressConfig,
45 MainConfig $mainConfig,
46 Util $util
47 );
48
49 /**
50 * Returns the file with path.
51 * @param null|string $directory
52 * @return string
53 */
54 public function getFileNameWithPath($directory = null): string;
55
56 /**
57 * Creates the file protection.
58 * @param string $directory
59 * @param string|null $objectType
60 * @param string|null $absolutePath
61 * @return bool
62 */
63 public function create(string $directory, ?string $objectType = null, ?string $absolutePath = null): bool;
64
65 /**
66 * Deletes the file protection.
67 * @param string $directory
68 * @return bool
69 */
70 public function delete(string $directory): bool;
71 }
72