1 21 package au.id.jericho.lib.html; 22 23 33 public final class PHPTagTypes { 34 35 74 public static final StartTagType PHP_STANDARD=StartTagTypePHPStandard.INSTANCE; 75 76 105 public static final StartTagType PHP_SHORT=StartTagTypePHPShort.INSTANCE; 106 107 130 public static final StartTagType PHP_SCRIPT=StartTagTypePHPScript.INSTANCE; 131 132 private static final TagType[] TAG_TYPES={ 133 PHP_STANDARD, 134 PHP_SHORT, 135 PHP_SCRIPT 136 }; 137 138 private PHPTagTypes() {} 139 140 145 public static void register() { 146 for (int i=0; i<TAG_TYPES.length; i++) TAG_TYPES[i].register(); 147 } 148 149 155 public static boolean defines(final TagType tagType) { 156 for (int i=0; i<TAG_TYPES.length; i++) 157 if (tagType==TAG_TYPES[i]) return true; 158 return false; 159 } 160 161 170 public static boolean isParsedByPHP(final TagType tagType) { 171 return tagType==StartTagType.SERVER_COMMON || defines(tagType); 172 } 173 } 174 | Popular Tags |