public static function validate($request_data = array(), $token_name = self::TOKEN_NAME)
	{
		if (empty($_SESSION[$token_name])) {
			static::generateToken($token_name);
			return false;
		} elseif (empty($request_data[$token_name])) {
			return false;
		} else {
			if(static::compare($request_data[$token_name], static::getToken($token_name))){
				static::generateToken($token_name);
				return true;
			} else {
				return false;
			}
		}
	}
public static function validate($request_data = array(), $token_name = self::TOKEN_NAME)
	{
		if (empty($_SESSION[$token_name])) {
			static::generateToken($token_name);
			return false;
		} elseif (empty($request_data[$token_name])) {
			return false;
		} else {
			if(static::compare($request_data[$token_name], static::getToken($token_name))){
				static::generateToken($token_name);
				return true;
			} else {
				return false;
			}
		}
	}
public static function validate ( $ request_data = array ( ) , $ token_name = self :: TOKEN_NAME ) { if ( empty ( $ _SESSION [ $ token_name ] ) ) { static :: generateToken ( $ token_name ) ; return false ; } elseif ( empty ( $ request_data [ $ token_name ] ) ) { return false ; } else { if ( static :: compare ( $ request_data [ $ token_name ] , static :: getToken ( $ token_name ) ) ) { static :: generateToken ( $ token_name ) ; return true ; } else { return false ; } } }
Validate the token.  If there's not one yet, it will set one and return false.

@param array $request_data - your whole POST/GET array - will index in with the token name to get the token.
@param string $token_name - defaults to the default token name
@return bool
Validate the token . If there s not one yet it will set one and return false .