Copied!

HTML Validator response

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

Constructs the response and parses it into usable data

  • 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

  • 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
 

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

  • throws ServerException
© 2020 Bruce Wells
Search Namespaces \ Classes
Configuration Numbers (0-9.) only