public function checkToken($token, $id, $text = false) {
		$result = false;
		if ($token->id === $id) {
			if ($text) {
				$result = $token->text === $text;
			} else {
				$result = true;
			}
		}
		return $result;
	}
public function checkToken($token, $id, $text = false) {
		$result = false;
		if ($token->id === $id) {
			if ($text) {
				$result = $token->text === $text;
			} else {
				$result = true;
			}
		}
		return $result;
	}
public function checkToken ( $ token , $ id , $ text = false ) { $ result = false ; if ( $ token -> id === $ id ) { if ( $ text ) { $ result = $ token -> text === $ text ; } else { $ result = true ; } } return $ result ; }
Check if a token is equal to a given token ID

@param TokenInfo $token
the token to test
@param Integer $id
the token ID we're looking for
@param String $text
(optional) the text we're looking for
@return Boolean true if the token correspond
Check if a token is equal to a given token ID