# user-access-manager/2.3.5/src/File/FileProtectionFactory.php

User Access Manager, version 2.3.5. 46 lines.

- Page: https://pluginprobe.com/plugins/user-access-manager/2.3.5/code/src/File/FileProtectionFactory.php
- Raw: https://pluginprobe.com/plugins/user-access-manager/2.3.5/raw/src/File/FileProtectionFactory.php
- Modified: 2025-12-10T06:50:44+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/user-access-manager/2.3.5/code/src/File/FileProtectionFactory.php#L10-L20`.

```php
<?php

declare(strict_types=1);

namespace UserAccessManager\File;

use UserAccessManager\Config\MainConfig;
use UserAccessManager\Config\WordpressConfig;
use UserAccessManager\Util\Util;
use UserAccessManager\Wrapper\Php;
use UserAccessManager\Wrapper\Wordpress;

class FileProtectionFactory
{
    public function __construct(
        private Php $php,
        private Wordpress $wordpress,
        private WordpressConfig $wordpressConfig,
        private MainConfig $mainConfig,
        private Util $util
    ) {
    }

    public function createApacheFileProtection(): ApacheFileProtection
    {
        return new ApacheFileProtection(
            $this->php,
            $this->wordpress,
            $this->wordpressConfig,
            $this->mainConfig,
            $this->util
        );
    }

    public function createNginxFileProtection(): NginxFileProtection
    {
        return new NginxFileProtection(
            $this->php,
            $this->wordpress,
            $this->wordpressConfig,
            $this->mainConfig,
            $this->util
        );
    }
}

```
