|
| 1 | +;; -*- mode: emacs-lisp -*- |
| 2 | +(("<?php". php-php-tag) |
| 3 | + ("\n\n") |
| 4 | + ("class". php-class-declaration) |
| 5 | + ("") |
| 6 | + ("Person".font-lock-type-face) |
| 7 | + ("\n{\n") |
| 8 | + ("// ".font-lock-comment-delimiter-face) |
| 9 | + ("A \"virtual\" property. It may not be set explicitly.\n".font-lock-comment-face) |
| 10 | + ("") |
| 11 | + ("public". php-keyword) |
| 12 | + ("") |
| 13 | + ("string". php-class) |
| 14 | + ("") |
| 15 | + ("$". php-variable-sigil) |
| 16 | + ("fullName". php-variable-name) |
| 17 | + ("{\n") |
| 18 | + ("get". php-builtin) |
| 19 | + ("") |
| 20 | + ("=". php-assignment-op) |
| 21 | + (">". php-comparison-op) |
| 22 | + ("") |
| 23 | + ("$". php-this-sigil) |
| 24 | + ("this". php-this) |
| 25 | + ("->". php-object-op) |
| 26 | + ("firstName". php-property-name) |
| 27 | + (" . ") |
| 28 | + ("' '". php-string) |
| 29 | + (" . ") |
| 30 | + ("$". php-this-sigil) |
| 31 | + ("this". php-this) |
| 32 | + ("->". php-object-op) |
| 33 | + ("lastName". php-property-name) |
| 34 | + (";\n }\n\n") |
| 35 | + ("// ".font-lock-comment-delimiter-face) |
| 36 | + ("All write operations go through this hook, and the result is what is written.\n".font-lock-comment-face) |
| 37 | + ("") |
| 38 | + ("// ".font-lock-comment-delimiter-face) |
| 39 | + ("Read access happens normally.\n".font-lock-comment-face) |
| 40 | + ("") |
| 41 | + ("public". php-keyword) |
| 42 | + ("") |
| 43 | + ("string". php-class) |
| 44 | + ("") |
| 45 | + ("$". php-variable-sigil) |
| 46 | + ("firstName". php-variable-name) |
| 47 | + ("{\n") |
| 48 | + ("set". php-builtin) |
| 49 | + ("") |
| 50 | + ("=". php-assignment-op) |
| 51 | + (">". php-comparison-op) |
| 52 | + ("") |
| 53 | + ("ucfirst". php-function-call-traditional) |
| 54 | + ("(") |
| 55 | + ("strtolower". php-function-call-traditional) |
| 56 | + ("(") |
| 57 | + ("$". php-variable-sigil) |
| 58 | + ("value". php-variable-name) |
| 59 | + ("));\n }\n\n") |
| 60 | + ("// ".font-lock-comment-delimiter-face) |
| 61 | + ("All write operations go through this hook, which has to write to the backing value itself.\n".font-lock-comment-face) |
| 62 | + ("") |
| 63 | + ("// ".font-lock-comment-delimiter-face) |
| 64 | + ("Read access happens normally.\n".font-lock-comment-face) |
| 65 | + ("") |
| 66 | + ("public". php-keyword) |
| 67 | + ("") |
| 68 | + ("string". php-class) |
| 69 | + ("") |
| 70 | + ("$". php-variable-sigil) |
| 71 | + ("lastName". php-variable-name) |
| 72 | + ("{\n") |
| 73 | + ("set". php-builtin) |
| 74 | + ("{\n") |
| 75 | + ("if". php-keyword) |
| 76 | + (" (") |
| 77 | + ("strlen". php-function-call-traditional) |
| 78 | + ("(") |
| 79 | + ("$". php-variable-sigil) |
| 80 | + ("value". php-variable-name) |
| 81 | + (") ") |
| 82 | + ("<". php-comparison-op) |
| 83 | + (" 2){\n") |
| 84 | + ("throw". php-keyword) |
| 85 | + ("") |
| 86 | + ("new". php-keyword) |
| 87 | + ("") |
| 88 | + ("\\InvalidArgumentException".font-lock-type-face) |
| 89 | + ("(") |
| 90 | + ("'Too short'". php-string) |
| 91 | + (");\n }\n") |
| 92 | + ("$". php-this-sigil) |
| 93 | + ("this". php-this) |
| 94 | + ("->". php-object-op) |
| 95 | + ("lastName". php-property-name) |
| 96 | + ("") |
| 97 | + ("=". php-assignment-op) |
| 98 | + ("") |
| 99 | + ("$". php-variable-sigil) |
| 100 | + ("value". php-variable-name) |
| 101 | + (";\n }\n }\n}\n\n") |
| 102 | + ("$". php-variable-sigil) |
| 103 | + ("p". php-variable-name) |
| 104 | + ("") |
| 105 | + ("=". php-assignment-op) |
| 106 | + ("") |
| 107 | + ("new". php-keyword) |
| 108 | + ("") |
| 109 | + ("Person".font-lock-type-face) |
| 110 | + ("();\n\n") |
| 111 | + ("$". php-variable-sigil) |
| 112 | + ("p". php-variable-name) |
| 113 | + ("->". php-object-op) |
| 114 | + ("firstName". php-property-name) |
| 115 | + ("") |
| 116 | + ("=". php-assignment-op) |
| 117 | + ("") |
| 118 | + ("'peter'". php-string) |
| 119 | + (";\n") |
| 120 | + ("print". php-keyword) |
| 121 | + ("") |
| 122 | + ("$". php-variable-sigil) |
| 123 | + ("p". php-variable-name) |
| 124 | + ("->". php-object-op) |
| 125 | + ("firstName". php-property-name) |
| 126 | + ("; ") |
| 127 | + ("// ".font-lock-comment-delimiter-face) |
| 128 | + ("Prints \"Peter\"\n".font-lock-comment-face) |
| 129 | + ("$". php-variable-sigil) |
| 130 | + ("p". php-variable-name) |
| 131 | + ("->". php-object-op) |
| 132 | + ("lastName". php-property-name) |
| 133 | + ("") |
| 134 | + ("=". php-assignment-op) |
| 135 | + ("") |
| 136 | + ("'Peterson'". php-string) |
| 137 | + (";\n") |
| 138 | + ("print". php-keyword) |
| 139 | + ("") |
| 140 | + ("$". php-variable-sigil) |
| 141 | + ("p". php-variable-name) |
| 142 | + ("->". php-object-op) |
| 143 | + ("fullName". php-property-name) |
| 144 | + ("; ") |
| 145 | + ("// ".font-lock-comment-delimiter-face) |
| 146 | + ("Prints \"Peter Peterson\"\n".font-lock-comment-face)) |
0 commit comments