HTML Validator (uses checker.html5.org as backend)
- author Espen Hovlandsdal
- copyright Copyright (c) Espen Hovlandsdal
- license http://www.opensource.org/licenses/mit-license MIT License
- link https://github.
com/rexxars/html-validator
Constants |
public HtmlValidator |
public HtmlValidator |
public HtmlValidator |
public HtmlValidator |
public HtmlValidator |
public HtmlValidator |
public HtmlValidator |
public HtmlValidator |
public HtmlValidator |
public HtmlValidator |
public HtmlValidator |
public HtmlValidator |
public HtmlValidator |
public HtmlValidator |
public HtmlValidator |
public HtmlValidator |
public HtmlValidator |
public HtmlValidator |
public HtmlValidator |
public HtmlValidator |
public HtmlValidator |
public HtmlValidator |
public HtmlValidator |
public HtmlValidator Characters sets
|
public HtmlValidator |
public HtmlValidator |
public HtmlValidator |
public HtmlValidator |
public HtmlValidator |
public HtmlValidator |
public HtmlValidator |
public HtmlValidator |
public HtmlValidator |
public HtmlValidator Default validator URL
|
public HtmlValidator |
public HtmlValidator |
public HtmlValidator |
public HtmlValidator |
public HtmlValidator Parser constants
|
public HtmlValidator |
Methods |
public __construct( $validatorUrl = 'https://validator.nu'self::DEFAULT_VALIDATOR_URL, $parser = 'html5'self::PARSER_HTML5) Constructs a new validator instance
|
public getCharset() Get the charset to report to the validator
|
public getParser() Get the set parser type
|
public setCharset( $charset) Set the charset to report to the validator
|
public setHttpClient( $httpClient) Set the HTTP client to use for requests
|
public setParser( $parser) Set parser to use for the given markup
|
public validate( $document, $charset = NULL) Validate a complete document (including DOCTYPE)
|
public validateDocument( $document, $charset = NULL) Validate a complete document (including DOCTYPE)
|
public validateNodes( $nodes, $charset = NULL) Validates a chunk of HTML/XML. A surrounding document will be created on the fly based on the formatter specified. Note that this can lead to unexpected behaviour:
NOTE: Use validateDocument() whenever possible.
|
public validateUrl( $url, $options = []) Validate a URL
|
Properties |
private $defaultCharset = 'UTF-8' Default charset to report to the validator
|
private $httpClient = NULL Holds the HTTP client used to communicate with the API
|
private $nodeWrapper = NULL Node wrapper tool
|
private $parser = NULL Parser to use for validating
|
Methods |
private getContentTypeString( $mimeType, $charset) Get a string usable for the Content-Type header, based on the given mime type and charset
|
private getMimeTypeForParser( $parser) Get the correct mime-type for the given parser
|