public static function validateRequest($silent = false)
    {
        // Only care if we have a POST request.
        if (count($_POST) > 0) {
            if (!self::validateToken($_POST["xsrf"])) {
                // Token was invalid, show an error page.
                if (!$silent) {
                    self::throwXSRFException();
                } else {
                    return false;
                }
            }
        }
    }
public static function validateRequest($silent = false)
    {
        // Only care if we have a POST request.
        if (count($_POST) > 0) {
            if (!self::validateToken($_POST["xsrf"])) {
                // Token was invalid, show an error page.
                if (!$silent) {
                    self::throwXSRFException();
                } else {
                    return false;
                }
            }
        }
    }
public static function validateRequest ( $ silent = false ) { // Only care if we have a POST request. if ( count ( $ _POST ) > 0 ) { if ( ! self :: validateToken ( $ _POST [ "xsrf" ] ) ) { // Token was invalid, show an error page. if ( ! $ silent ) { self :: throwXSRFException ( ) ; } else { return false ; } } } }
This will validate a request has a good token.

@throws SymphonyErrorPage
@param boolean $silent
If true, this function will return false if the request fails,
otherwise it will throw an Exception. By default this function
will thrown an exception if the request is invalid.
@return false|void
This will validate a request has a good token .