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