examples/whatsapp.php
public function process()
    {
        switch ($this->inputs['action']) {
            case 'login':
                $this->webLogin();
                break;
            case 'logout':
                $this->webLogout();
                exit($this->showWebLoginForm());
                break;
            case 'getContacts':
                $this->getContacts();
                break;
            case 'updateStatus':
                $this->updateStatus();
                break;
            case 'sendMessage':
                $this->sendMessage();
                break;
            case 'sendBroadcast':
                $this->sendBroadcast();
                break;
            default:
                if (isset($_SESSION['logged_in']) && $_SESSION['logged_in'] == true) {
                    exit($this->showWebForm());
                }
                exit($this->showWebLoginForm());
                break;
        }
    }
public function process()
    {
        switch ($this->inputs['action']) {
            case 'login':
                $this->webLogin();
                break;
            case 'logout':
                $this->webLogout();
                exit($this->showWebLoginForm());
                break;
            case 'getContacts':
                $this->getContacts();
                break;
            case 'updateStatus':
                $this->updateStatus();
                break;
            case 'sendMessage':
                $this->sendMessage();
                break;
            case 'sendBroadcast':
                $this->sendBroadcast();
                break;
            default:
                if (isset($_SESSION['logged_in']) && $_SESSION['logged_in'] == true) {
                    exit($this->showWebForm());
                }
                exit($this->showWebLoginForm());
                break;
        }
    }
public function process ( ) { switch ( $ this -> inputs [ 'action' ] ) { case 'login' : $ this -> webLogin ( ) ; break ; case 'logout' : $ this -> webLogout ( ) ; exit ( $ this -> showWebLoginForm ( ) ) ; break ; case 'getContacts' : $ this -> getContacts ( ) ; break ; case 'updateStatus' : $ this -> updateStatus ( ) ; break ; case 'sendMessage' : $ this -> sendMessage ( ) ; break ; case 'sendBroadcast' : $ this -> sendBroadcast ( ) ; break ; default : if ( isset ( $ _SESSION [ 'logged_in' ] ) && $ _SESSION [ 'logged_in' ] == true ) { exit ( $ this -> showWebForm ( ) ) ; } exit ( $ this -> showWebLoginForm ( ) ) ; break ; } }
Process the latest request.

Decide what course of action to take with the latest
request/post to this script.

@return void
Process the latest request .