PHP Classes

File: commands/logout.php

Recommend this page to a friend!
  Classes of Andoitz Jordan Marmolejo   PHP Query Terminal   commands/logout.php   Download  
File: commands/logout.php
Role: Example script
Content type: text/plain
Description: Class example for command
Class: PHP Query Terminal
Run command classes from an interactive console
Author: By
Last change: Update of commands/logout.php
Date: 9 months ago
Size: 407 bytes
 

Contents

Class file image Download
<?php
Class logout extends Command{
    public function
__construct(){
       
parent::__construct();
    }
    public function
init($params){
       
session_unset();
       
$this->abort("La sesiĆ³n se ha cerrado correctamente.");
    }
    private function
abort($message,$header=array()){
       
$result = array("data" => "\n [[ib;#FFF;<BACKGROUND>]".$message."]\n",
                       
"header" => $header);
        echo
json_encode($result);
        die();
    }
}
?>