24 lines
396 B
PHP
24 lines
396 B
PHP
<?php
|
|
|
|
class AccessControl
|
|
{
|
|
public User $user;
|
|
|
|
private array $routes;
|
|
|
|
public function __construct(User $user)
|
|
{
|
|
$this->user = $user;
|
|
$this->routes = [
|
|
"index.php" => ["catcher", 0]
|
|
];
|
|
|
|
|
|
call_user_func_array([$this, "catcher"], [0]);
|
|
}
|
|
|
|
private function catcher($level): void
|
|
{
|
|
echo "hello $level";
|
|
}
|
|
} |