function Global / abort_if
You are viewing an older version of the documentation. For the latest, please visit master documentation.

abort_if

abort_if ( ) : void

Throw an HttpException with the given data if the given condition is true.

Parameters

  • $boolean bool
  • $code Symfony\...\Response|Responsable |int
  • $message string
  • $headers array