Copied!

HTML Validator response

CloneableInstantiable
Methods
public __construct(Psr\Http\Message\ResponseInterface $response)
 

Constructs the response and parses it into usable data

  • param \HttpResponse $response
  • throws \ServerException
public __toString() : string
 

Returns a string containing all the messages encountered

  • return string
public format( $useHTML = false)
 

Returns a string-representation of all messages encountered

  • param bool $useHTML Whether to use HTML for formatting
  • return string
public getErrors()
 

Returns all encountered errors

  • return array
public getMessages()
 

Returns all encountered messages

  • return array
public getWarnings()
 

Returns all encountered warnings

  • return array
public hasErrors()
 

Returns whether the markup the user tried to validate had any errors

  • return bool
public hasMessages()
 

Returns whether the markup the user tried to validate resulted in any messages

  • return bool
public hasWarnings()
 

Returns whether the markup the user tried to validate had any warnings

  • return bool
public toHTML()
 

Returns an HTML-representation of all messages encountered

  • return string
Properties
private $errors = []
 

List of errors encountered

  • var array
private $httpResponse = NULL
 

HTTP response

  • var \HttpResponse
private $messages = []
 

List of all messages encountered

  • var array
private $warnings = []
 

List of warnings encountered

  • var array
Methods
private parse()
 

Parse the received response into a usable format

private validateResponse( $response)
 

Validate the HTTP response and throw exceptions on errors

  • param \HttpResponse $response
  • throws \ServerException
© 2025 Bruce Wells
Search Namespaces \ Classes
Configuration