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

Class: Services_W3C_CSSValidator

Source Location: /Services_W3C_CSSValidator-0.2.3/Services/W3C/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_Request2 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

addPostParameter   [line 357]

void addPostParameter( string $name, [mixed $value = ''])

Add post data to the request
  • Access: protected

Parameters:

string   $name   —  Name of the post field
mixed   $value   —  Value of the field

[ Top ]

buildRequest   [line 296]

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 392]

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 369]

bool sendRequest( )

Actually sends the request to the CSS Validator service
  • Return: TRUE if request was sent successfully, FALSE otherwise
  • Todo: Raise dependency to 5.3.0 all together? (#18082)
  • Access: protected

[ Top ]

setQueryVariable   [line 342]

void setQueryVariable( string $name, [mixed $value = ''])

Set a querystring variable for the request
  • Access: protected

Parameters:

string   $name   —  Name of the querystring parameter
mixed   $value   —  Value of the parameter

[ Top ]

validateFile   [line 254]

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 278]

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 231]

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( [HTTP_Request2 $request = null])

Constructor for the class.
  • Access: public

Parameters:

HTTP_Request2   $request   — 

[ Top ]

__get   [line 203]

mixed __get( string $option)

Gets options for the class.
  • Access: public

Parameters:

string   $option   —  Name of option to set

[ Top ]

__set   [line 182]

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:49:01 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.