1 | <?php |
||
18 | final class Quoted |
||
19 | { |
||
20 | /** |
||
21 | * @param Tokenizer $tokenizer |
||
22 | * @param string $string |
||
23 | */ |
||
24 | public static function isQuoted(Tokenizer $tokenizer, $string) |
||
30 | |||
31 | /** |
||
32 | * @param string $string |
||
33 | * |
||
34 | * @return bool |
||
35 | */ |
||
36 | protected static function isQuotedString($string) |
||
40 | |||
41 | /** |
||
42 | * @param string $string |
||
43 | * |
||
44 | * @return array |
||
45 | */ |
||
46 | protected static function getQuotedString($string) |
||
59 | |||
60 | /** |
||
61 | * This checks for the following patterns: |
||
62 | * 1. backtick quoted string using `` to escape |
||
63 | * 2. square bracket quoted string (SQL Server) using ]] to escape |
||
64 | * 3. double quoted string using "" or \" to escape |
||
65 | * 4. single quoted string using '' or \' to escape. |
||
66 | * |
||
67 | * @param string $string |
||
68 | * |
||
69 | * @return null |
||
70 | */ |
||
71 | public static function wrapStringWithQuotes($string) |
||
84 | } |
||
85 |