[3.0.0] Convert all $context calls away from references
[htmlpurifier.git] / library / HTMLPurifier / AttrDef / HTML / Bool.php
blob486ca85d4f72f888c6d3670926b11f9ce27d35b8
1 <?php
3 require_once 'HTMLPurifier/AttrDef.php';
5 /**
6 * Validates a boolean attribute
7 */
8 class HTMLPurifier_AttrDef_HTML_Bool extends HTMLPurifier_AttrDef
11 protected $name;
12 public $minimized = true;
14 public function __construct($name = false) {$this->name = $name;}
16 public function validate($string, $config, $context) {
17 if (empty($string)) return false;
18 return $this->name;
21 /**
22 * @param $string Name of attribute
24 public function make($string) {
25 return new HTMLPurifier_AttrDef_HTML_Bool($string);