PHP Classes
elePHPant
Icontem

File: commands/logout.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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:
Date: 1 year 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();
    }
}
?>