Warning, file /webapps/ocs-webserver/library/HTMLPurifier/AttrDef/HTML/Bool.php was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 <?php
0002 
0003 /**
0004  * Validates a boolean attribute
0005  */
0006 class HTMLPurifier_AttrDef_HTML_Bool extends HTMLPurifier_AttrDef
0007 {
0008 
0009     /**
0010      * @type bool
0011      */
0012     protected $name;
0013 
0014     /**
0015      * @type bool
0016      */
0017     public $minimized = true;
0018 
0019     /**
0020      * @param bool $name
0021      */
0022     public function __construct($name = false)
0023     {
0024         $this->name = $name;
0025     }
0026 
0027     /**
0028      * @param string $string
0029      * @param HTMLPurifier_Config $config
0030      * @param HTMLPurifier_Context $context
0031      * @return bool|string
0032      */
0033     public function validate($string, $config, $context)
0034     {
0035         return $this->name;
0036     }
0037 
0038     /**
0039      * @param string $string Name of attribute
0040      * @return HTMLPurifier_AttrDef_HTML_Bool
0041      */
0042     public function make($string)
0043     {
0044         return new HTMLPurifier_AttrDef_HTML_Bool($string);
0045     }
0046 }
0047 
0048 // vim: et sw=4 sts=4