-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathdemo.php
More file actions
30 lines (21 loc) · 661 Bytes
/
Copy pathdemo.php
File metadata and controls
30 lines (21 loc) · 661 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
declare(strict_types=1);
namespace App\Structural\Proxy;
require(__DIR__ . '/../../../vendor/autoload.php');
session_start();
$provider = new FileProvider();
$fileAuth = new AuthFile($provider);
$fileAuth->add("test-file.png", "/home/ubuntu");
$fileAuth->remove("test-file.png");
$fileAuth->get("test-file.png");
$auth = new User();
$auth->login("Jan");
$fileAuth->add("test-file.png", "/home/ubuntu");
$fileAuth->remove("test-file.png");
$fileAuth->get("test-file.png");
$auth->logOut();
$auth->login("BB");
$fileAuth->add("test-file.png", "/home/ubuntu");
$fileAuth->remove("test-file.png");
$fileAuth->get("test-file.png");
session_destroy();