Services_W3C_CSSValidator
[ class tree: Services_W3C_CSSValidator ] [ index: Services_W3C_CSSValidator ] [ all elements ]

Class: Services_W3C_CSSValidator

Source Location: /Services_W3C_CSSValidator-0.1.0/CSSValidator.php

Class Overview


Base class for utilizing the W3C CSS Validator service.


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 59]
Base class for utilizing the W3C CSS Validator service.


[ Top ]


Class Variables

$fragment =

[line 91]

CSS fragment to validate.

Full documents only. At the moment, will only work if data is sent with the UTF-8 encoding.

  • Access: protected

Type:   string


[ Top ]

$options =

[line 148]

Options list (available with default values) :

output - Output format Triggers the various outputs formats of the validator. If unset, the usual Web html format will be sent. If set to soap12, the SOAP1.2 interface will be triggered.

warning - Warning level Default value is '1', and value could one of these :

  • 2
  • 1
  • 0
  • no

profile - Profile Default value is 'css21', and value could one of these :

  • none
  • css1
  • css2
  • css21
  • css3
  • svg
  • svgbasic
  • svgtiny
  • mobile
  • atsc-tv
  • tv

usermedium - User medium Default value is 'all', and value could one of these :

  • all
  • aural
  • braille
  • embossed
  • handheld
  • print
  • projection
  • screen
  • tty
  • tv
  • presentation

lang - Language used for response messages Default value is 'en', and value could one of these : en, fr, ja, es, zh-cn, nl, de

  • Access: protected

Type:   array


[ Top ]

$request =

[line 155]

HTTP_Request object.
  • Access: protected

Type:   object


[ Top ]

$uploaded_file =

[line 81]

Internally used filename of a file to upload to the validator POSTed as multipart/form-data
  • Access: protected

Type:   string


[ Top ]

$uri =

[line 73]

The URL of the document to validate
  • Access: protected

Type:   string


[ Top ]



Method Detail

buildRequest   [line 293]

void buildRequest( [string $type = 'uri'])

Prepares a request object to send to the validator.
  • Access: protected

Parameters:

string   $type   —  uri, file, or fragment

[ Top ]

parseSOAP12Response   [line 356]

mixed parseSOAP12Response( string $xml)

Parse an XML response from the validator

This function parses a SOAP 1.2 response xml string from the validator.

  • Return: object Services_W3C_CSSValidator_Response if parsing soap12 response successfully, boolean FALSE otherwise
  • Access: protected

Parameters:

string   $xml   —  The raw soap12 XML response from the validator.

[ Top ]

sendRequest   [line 336]

bool sendRequest( )

Actually sends the request to the CSS Validator service
  • Return: TRUE if request was sent successfully, FALSE otherwise
  • Access: protected

[ Top ]

validateFile   [line 249]

mixed validateFile( string $file)

Validates the local file

Requests validation on the local file, from an instance of the W3C validator. The file is posted to the W3C validator using multipart/form-data.

  • Return: object Services_W3C_CSSValidator_Response if web service call successfull, boolean FALSE otherwise
  • Access: public

Parameters:

string   $file   —  file to be validated.

[ Top ]

validateFragment   [line 274]

mixed validateFragment( string $css)

Validate an html string
  • Return: object Services_W3C_CSSValidator_Response if web service call successfull, boolean FALSE otherwise
  • Access: public

Parameters:

string   $css   —  Full css document fragment

[ Top ]

validateUri   [line 225]

mixed validateUri( string $uri)

Validates a given URI

Executes the validator using the current parameters and returns a Response object on success.

  • Return: object Services_W3C_CSSValidator_Response if web service call successfull, boolean FALSE otherwise
  • Access: public

Parameters:

string   $uri   —  The address to the page to validate ex: http://example.com/

[ Top ]

__construct (Constructor)   [line 162]

void __construct( )

Constructor for the class.
  • Access: public

[ Top ]

__get   [line 197]

mixed __get( string $option)

Gets options for the class.
  • Access: public

Parameters:

string   $option   —  Name of option to set

[ Top ]

__set   [line 176]

void __set( string $option, string $val)

Sets options for the class.
  • Access: public

Parameters:

string   $option   —  Name of option to set
string   $val   —  Value of option to set

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:11:36 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.