| @@ -1,5 +1,18 @@ | ||
| 1 | 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 | + */ | |
| 2 | 15 | |
| 3 | 16 | declare(strict_types=1); |
| 4 | 17 | |
| 5 | 18 | namespace UserAccessManager\File; |
| @@ -9,10 +22,23 @@ | ||
| 9 | 22 | use UserAccessManager\Util\Util; |
| 10 | 23 | use UserAccessManager\Wrapper\Php; |
| 11 | 24 | use UserAccessManager\Wrapper\Wordpress; |
| 12 | 25 | |
| 26 | +/** | |
| 27 | + * Interface FileProtectionInterface | |
| 28 | + * | |
| 29 | + * @package UserAccessManager\FileProtection | |
| 30 | + */ | |
| 13 | 31 | interface FileProtectionInterface |
| 14 | 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 | + */ | |
| 15 | 41 | public function __construct( |
| 16 | 42 | Php $php, |
| 17 | 43 | Wordpress $wordpress, |
| 18 | 44 | WordpressConfig $wordpressConfig, |
| @@ -19,8 +45,27 @@ | ||
| 19 | 45 | MainConfig $mainConfig, |
| 20 | 46 | Util $util |
| 21 | 47 | ); |
| 22 | 48 | |
| 23 | - public function getFileNameWithPath(?string $directory = null): string; | |
| 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 | + */ | |
| 24 | 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 | + */ | |
| 25 | 70 | public function delete(string $directory): bool; |
| 26 | 71 | } |