| 1 | <?php |
||
| 15 | trait xsdRestrictions |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * Checks if it is a valid NCName |
||
| 19 | * |
||
| 20 | * <xsd:simpleType name="NCName" id="NCName"> |
||
| 21 | * <xsd:restriction base="xsd:Name"> |
||
| 22 | * <xsd:pattern value="[\i-[:]][\c-[:]]*"/> |
||
| 23 | * </xsd:restriction> |
||
| 24 | * </xsd:simpleType> |
||
| 25 | * |
||
| 26 | * @param $string string the string to check |
||
| 27 | * @return bool if it is valid |
||
| 28 | */ |
||
| 29 | protected function isNCName($string) |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Checks a pattern against a string |
||
| 36 | * @param $pattern string the regex pattern |
||
| 37 | * @param $string string the string to check |
||
| 38 | * @return bool true if string matches pattern |
||
| 39 | */ |
||
| 40 | protected function MatchesRegexPattern($pattern, $string) |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Checks if is ivalid Name |
||
| 47 | * |
||
| 48 | * |
||
| 49 | * <xsd:simpleType name="Name" id="Name"> |
||
| 50 | * <xsd:restriction base="xsd:token"> |
||
| 51 | * <xsd:pattern value="\i\c*"/> |
||
| 52 | * </xsd:restriction> |
||
| 53 | * </xsd:simpleType> |
||
| 54 | * |
||
| 55 | * @param $string string the string to check |
||
| 56 | * @return bool if it is valid |
||
| 57 | */ |
||
| 58 | protected function isName($string) |
||
| 62 | } |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.