00001 <?php 00002 00013 abstract class HTMLPurifier_AttrDef 00014 { 00015 00020 public $minimized = false; 00021 00026 public $required = false; 00027 00035 abstract public function validate($string, $config, $context); 00036 00058 public function parseCDATA($string) { 00059 $string = trim($string); 00060 $string = str_replace(array("\n", "\t", "\r"), ' ', $string); 00061 return $string; 00062 } 00063 00069 public function make($string) { 00070 // default implementation, return a flyweight of this object. 00071 // If $string has an effect on the returned object (i.e. you 00072 // need to overload this method), it is best 00073 // to clone or instantiate new copies. (Instantiation is safer.) 00074 return $this; 00075 } 00076 00081 protected function mungeRgb($string) { 00082 return preg_replace('/rgb\((\d+)\s*,\s*(\d+)\s*,\s*(\d+)\)/', 'rgb(\1,\2,\3)', $string); 00083 } 00084 00085 } 00086 00087 // vim: et sw=4 sts=4
| Copyright © 2003 - 2009 MyOOS [Shopsystem]. All rights reserved. MyOOS [Shopsystem] is Free Software released under the GNU/GPL License. Webmaster: info@r23.de (Impressum) |
|
