home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Servidores / xampp-win32-1.6.7-installer.exe / php / PEAR / Services / W3C / HTMLValidator / Response.php < prev    next >
Encoding:
PHP Script  |  2008-07-02  |  2.2 KB  |  92 lines

  1. <?php
  2. /**
  3.  * File contains a simple class structure for holding a response from the
  4.  * W3C HTMLValidator software.
  5.  * 
  6.  * PHP versions 5
  7.  * 
  8.  * @category Services
  9.  * @package  Services_W3C_HTMLValidator
  10.  * @author   Brett Bieber <brett.bieber@gmail.com>
  11.  * @license  http://www.opensource.org/licenses/bsd-license.php BSD
  12.  * @version  CVS: $id$
  13.  * @link     http://pear.php.net/package/Services_W3C_HTMLValidator
  14.  * @since    File available since Release 0.2.0
  15.  */
  16.  
  17. /**
  18.  * Simple class for a W3C HTML Validator Response.
  19.  * 
  20.  * @category Services
  21.  * @package  Services_W3C_HTMLValidator
  22.  * @author   Brett Bieber <brett.bieber@gmail.com>
  23.  * @license  http://www.opensource.org/licenses/bsd-license.php BSD
  24.  * @link     http://pear.php.net/package/Services_W3C_HTMLValidator
  25.  */
  26. class Services_W3C_HTMLValidator_Response
  27. {
  28.     /**
  29.      * the address of the document validated
  30.      * 
  31.      * Will (likely?) be upload://Form Submission  
  32.      * if an uploaded document or fragment was validated. In EARL terms, this is
  33.      * the TestSubject.
  34.      * @var string
  35.      */
  36.     public $uri;
  37.     
  38.     /**
  39.      * Location of the service which provided the validation result. In EARL terms,
  40.      * this is the Assertor.
  41.      * @var string
  42.      */
  43.     public $checkedby;
  44.     
  45.     /**
  46.      * Detected (or forced) Document Type for the validated document
  47.      * @var string
  48.      */
  49.     public $doctype;
  50.     
  51.     /**
  52.      * Detected (or forced) Character Encoding for the validated document
  53.      * @var string
  54.      */
  55.     public $charset;
  56.     
  57.     /**
  58.      * Whether or not the document validated passed or not formal validation 
  59.      * (true|false boolean)
  60.      * @var bool
  61.      */
  62.     public $validity;
  63.     
  64.     /**
  65.      * Array of HTMLValidator_Error objects (if applicable)
  66.      * @var array
  67.      */
  68.     public $errors = array();
  69.     
  70.     /**
  71.      * Array of HTMLValidator_Warning objects (if applicable)
  72.      * @var array
  73.      */
  74.     public $warnings = array();
  75.     
  76.     /**
  77.      * Returns the validity of the checked document.
  78.      * 
  79.      * @return bool
  80.      */
  81.     function isValid()
  82.     {
  83.         if ($this->validity) {
  84.             return true;
  85.         } else {
  86.             return false;
  87.         }
  88.     }
  89.     
  90. }
  91.  
  92. ?>