FIle - /trunk/views/php/logout.php

/trunk/views/php/logout.php
426 bytes
January 20, 2025 at 08:22
4




<?php
declare(strict_types 1);

namespace 
Views;

use 
Apex\Svc\{ViewApp};

/**
 * Render the template.
 */
class logout
{

    
/**
     * Render
     */
    
public function render(View $viewApp $app):void
    
{

        
// Logout, if needed
        
if (null !== ($session $app->getSession())) {
            
$session->logout();
            
$app->setSession(null);
            
$app->setUser(null);
        }

    }

}