public function validateToken($token)
    {
        if (isset($_SESSION[$this->session_name])) {
            if ($_SESSION[$this->session_name] === $token) {
                return true;
            } else {
                return false;
            }
        } else {
            return false;
        }
    }
public function validateToken($token)
    {
        if (isset($_SESSION[$this->session_name])) {
            if ($_SESSION[$this->session_name] === $token) {
                return true;
            } else {
                return false;
            }
        } else {
            return false;
        }
    }
public function validateToken ( $ token ) { if ( isset ( $ _SESSION [ $ this -> session_name ] ) ) { if ( $ _SESSION [ $ this -> session_name ] === $ token ) { return true ; } else { return false ; } } else { return false ; } }
Checking the token

@param string $token The token to check

@return boolean Return result

@version v2.0.0
@author Dmitrii Shcherbakov <atomcms@ya.ru>
Checking the token