1<?php 2 3class CSSFontStyle extends CSSSubFieldProperty { 4 function default_value() { 5 return FS_NORMAL; 6 } 7 8 function parse($value) { 9 $value = trim(strtolower($value)); 10 switch ($value) { 11 case 'inherit': 12 return CSS_PROPERTY_INHERIT; 13 case 'normal': 14 return FS_NORMAL; 15 case 'italic': 16 return FS_ITALIC; 17 case 'oblique': 18 return FS_OBLIQUE; 19 }; 20 } 21 22 function get_property_code() { 23 return CSS_FONT_STYLE; 24 } 25 26 function get_property_name() { 27 return 'font-style'; 28 } 29 30} 31 32?>