quail Class Reference

List of all members.

Public Member Functions

 __construct ($value, $guideline= 'wcag', $type= 'string', $reporter= 'static', $domain= 'en')
 prepareDOM ()
 prepareValue ()
 setOption ($variable, $value=null)
 getAbsolutePath ($absolute, $relative)
 setUri ($uri)
 prepareBaseUrl ($value, $type)
 getBaseFromFile ($file)
 addCSS ($css)
 getError ($error)
 loadReporter ($options=array())
 isValid ()
 runCheck ($options=null)
 getCSSObject ()
 getReport ($options=array())
 getTest ($test)
 getTestSeverity ($test)
 cleanup ()


Detailed Description

The main interface class for quail.

Definition at line 43 of file quail.php.


Constructor & Destructor Documentation

quail::__construct ( value,
guideline = 'wcag',
type = 'string',
reporter = 'static',
domain = 'en' 
)

The class constructor

Parameters:
string $value Either the HTML string to check or the file/uri of the request
string $guideline The name of the guideline
string $type The type of the request (either file, uri, or string)
string $reporter The name of the reporter to use
string $domain The domain of the translation language to use

Definition at line 132 of file quail.php.


Member Function Documentation

quail::addCSS ( css  ) 

Helper method to add an additional CSS file

Parameters:
string $css The URI or file path to a CSS file

Definition at line 310 of file quail.php.

quail::cleanup (  ) 

A general cleanup function which just does some memory cleanup by unsetting the particularly large local vars.

Definition at line 416 of file quail.php.

quail::getAbsolutePath ( absolute,
relative 
)

Returns an absolute path from a relative one

Parameters:
string $absolute The absolute URL
string $relative The relative path
Returns:
string A new path

Definition at line 193 of file quail.php.

quail::getBaseFromFile ( file  ) 

Retrieves the absolute path to a file

Parameters:
string $file The path to a file
Returns:
string The absolute path to a file

Definition at line 296 of file quail.php.

Referenced by prepareBaseUrl().

quail::getCSSObject (  ) 

Loads the quailCSS object

Definition at line 371 of file quail.php.

Referenced by runCheck().

quail::getError ( error  ) 

Retrives a single error from the current reporter

Parameters:
string $error The error key
Returns:
object A QuailReportItem object

Definition at line 324 of file quail.php.

quail::getReport ( options = array()  ) 

Returns a formatted report from the current reporter.

Parameters:
array $options An array of all the options
Returns:
mixed See the documentation on your reporter's getReport method.

Definition at line 380 of file quail.php.

References loadReporter().

quail::getTest ( test  ) 

Runs one test on the current DOMDocument string $test The name of the test to run object The QuailReportItem returned from the test

Definition at line 394 of file quail.php.

quail::getTestSeverity ( test  ) 

Retrieves the default severity of a test string $test The name of the test to run object The severity level of the test

Definition at line 407 of file quail.php.

quail::isValid (  ) 

Checks that the DOM object is valid or not

Returns:
bool Whether the DOMDocument is valid

Definition at line 347 of file quail.php.

Referenced by runCheck().

quail::loadReporter ( options = array()  ) 

A local method to load the required file for a reporter and set it for the current QUAIL object

Parameters:
array $options An array of options for the reporter

Definition at line 332 of file quail.php.

Referenced by getReport().

quail::prepareBaseUrl ( value,
type 
)

Formats the base URL for either a file or uri request. We are essentially formatting a base url for future reporters to use to find CSS files or for tests that use external resources (images, objects, etc) to run tests on them.

Parameters:
string $value The path value
string $type The type of request

Definition at line 270 of file quail.php.

References getBaseFromFile().

Referenced by prepareDOM().

quail::prepareDOM (  ) 

Preapres the DOMDocument object for quail. It loads based on the file type declaration and first scrubs the value using prepareValue()

Definition at line 149 of file quail.php.

References prepareBaseUrl(), and prepareValue().

Referenced by runCheck().

quail::prepareValue (  ) 

If the CMS mode options are set, then we remove some items fromt the HTML value before sending it back.

Definition at line 160 of file quail.php.

Referenced by prepareDOM().

quail::runCheck ( options = null  ) 

Starts running automated checks. Loads the CSS file parser and the guideline object.

Definition at line 356 of file quail.php.

References getCSSObject(), isValid(), and prepareDOM().

quail::setOption ( variable,
value = null 
)

Set global predefined options for QUAIL. First we check that the array key has been defined.

Parameters:
mixed $variable Either an array of values, or a variable name of the option
mixed $value If this is a single option, the value of the option

Definition at line 175 of file quail.php.

quail::setUri ( uri  ) 

Sets the URI if this is for a string or to change where QUAIL will look for resources like CSS files

Parameters:
string $uri The URI to set

Definition at line 257 of file quail.php.


The documentation for this class was generated from the following file:

Generated on Sat Aug 21 08:55:12 2010 for QUAIL Accessibility Information library by  doxygen 1.5.7.1