| 1 | <?php |
||
| 5 | final class Json |
||
| 6 | { |
||
| 7 | const TRANSFORM_QUOTATION_PATTERN = '/([^"])@([a-zA-Z0-9\.]+)@([^"])/'; |
||
| 8 | const TRANSFORM_QUOTATION_REPLACEMENT = '$1"@$2@"$3'; |
||
| 9 | |||
| 10 | /** |
||
| 11 | * @param string $value |
||
| 12 | * @return bool |
||
| 13 | */ |
||
| 14 | public static function isValid($value) |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Before checking json it wraps type patterns (@type@) with quotes ("@type@") |
||
| 29 | * |
||
| 30 | * @param string $value |
||
| 31 | * @return bool |
||
| 32 | */ |
||
| 33 | public static function isValidPattern($value) |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Wraps placeholders which arent wrapped with quotes yet |
||
| 44 | * |
||
| 45 | * @param $pattern |
||
| 46 | * @return mixed |
||
| 47 | */ |
||
| 48 | public static function transformPattern($pattern) |
||
| 52 | } |
||
| 53 |