FIle - /trunk/views/php/logout.php
/trunk/views/php/logout.php
|
|
426 bytes
|
|
January 20, 2025 at 08:22
|
|
<?php
declare(strict_types = 1);
namespace Views;
use Apex\Svc\{View, App};
/**
* Render the template.
*/
class logout
{
/**
* Render
*/
public function render(View $view, App $app):void
{
// Logout, if needed
if (null !== ($session = $app->getSession())) {
$session->logout();
$app->setSession(null);
$app->setUser(null);
}
}
}