|
50 | 50 |
|
51 | 51 | #include "support.h" |
52 | 52 | #include "generated/ArenaCache.h" |
| 53 | + |
| 54 | +namespace sigs = ptdecl::ArenaCache::sig; |
53 | 55 | #include "reg.h" |
54 | 56 | #include "zv.h" |
55 | 57 |
|
@@ -1177,60 +1179,60 @@ void pt_register_arena_cache() |
1177 | 1179 | ptdecl::ArenaCache::declareClass(cls); |
1178 | 1180 | ptdecl::ArenaCache::declareProperties(cls); |
1179 | 1181 |
|
1180 | | - cls.method("create", reg::PublicStatic, 1, { reg::stringArg("runId") }, [](INTERNAL_FUNCTION_PARAMETERS) { |
| 1182 | + cls.method(sigs::create, [](INTERNAL_FUNCTION_PARAMETERS) { |
1181 | 1183 | zend_string *runId; |
1182 | 1184 | if (!zp::parse<zp::Str>(execute_data, runId)) RETURN_THROWS(); |
1183 | 1185 | phpstanturbo::ArenaCache::create(runId, return_value); |
1184 | 1186 | }); |
1185 | 1187 |
|
1186 | | - cls.method("attach", reg::PublicStatic, 1, { reg::stringArg("name") }, [](INTERNAL_FUNCTION_PARAMETERS) { |
| 1188 | + cls.method(sigs::attach, [](INTERNAL_FUNCTION_PARAMETERS) { |
1187 | 1189 | zend_string *name; |
1188 | 1190 | if (!zp::parse<zp::Str>(execute_data, name)) RETURN_THROWS(); |
1189 | 1191 | RETURN_BOOL(phpstanturbo::ArenaCache::attach(name)); |
1190 | 1192 | }); |
1191 | 1193 |
|
1192 | | - cls.method("unlinkName", reg::PublicStatic, 0, {}, [](INTERNAL_FUNCTION_PARAMETERS) { |
| 1194 | + cls.method(sigs::unlinkName, [](INTERNAL_FUNCTION_PARAMETERS) { |
1193 | 1195 | ZEND_PARSE_PARAMETERS_NONE(); |
1194 | 1196 | phpstanturbo::ArenaCache::unlinkName(); |
1195 | 1197 | }); |
1196 | 1198 |
|
1197 | | - cls.method("destroy", reg::PublicStatic, 0, {}, [](INTERNAL_FUNCTION_PARAMETERS) { |
| 1199 | + cls.method(sigs::destroy, [](INTERNAL_FUNCTION_PARAMETERS) { |
1198 | 1200 | ZEND_PARSE_PARAMETERS_NONE(); |
1199 | 1201 | phpstanturbo::ArenaCache::destroy(); |
1200 | 1202 | }); |
1201 | 1203 |
|
1202 | | - cls.method("hasRecord", reg::PublicStatic, 1, { reg::stringArg("key") }, [](INTERNAL_FUNCTION_PARAMETERS) { |
| 1204 | + cls.method(sigs::hasRecord, [](INTERNAL_FUNCTION_PARAMETERS) { |
1203 | 1205 | zend_string *key; |
1204 | 1206 | if (!zp::parse<zp::Str>(execute_data, key)) RETURN_THROWS(); |
1205 | 1207 | RETURN_BOOL(phpstanturbo::ArenaCache::hasRecord(key)); |
1206 | 1208 | }); |
1207 | 1209 |
|
1208 | | - cls.method("lookup", reg::PublicStatic, 1, { reg::stringArg("key") }, [](INTERNAL_FUNCTION_PARAMETERS) { |
| 1210 | + cls.method(sigs::lookup, [](INTERNAL_FUNCTION_PARAMETERS) { |
1209 | 1211 | zend_string *key; |
1210 | 1212 | if (!zp::parse<zp::Str>(execute_data, key)) RETURN_THROWS(); |
1211 | 1213 | phpstanturbo::ArenaCache::lookup(key, return_value); |
1212 | 1214 | }); |
1213 | 1215 |
|
1214 | | - cls.method("publish", reg::PublicStatic, 2, { reg::stringArg("key"), reg::any("value") }, [](INTERNAL_FUNCTION_PARAMETERS) { |
| 1216 | + cls.method(sigs::publish, [](INTERNAL_FUNCTION_PARAMETERS) { |
1215 | 1217 | zend_string *key; |
1216 | 1218 | zval *value; |
1217 | 1219 | if (!zp::parse<zp::Str, zp::Zval>(execute_data, key, value)) RETURN_THROWS(); |
1218 | 1220 | phpstanturbo::ArenaCache::publish(key, value); |
1219 | 1221 | }); |
1220 | 1222 |
|
1221 | | - cls.method("lookupHash", reg::PublicStatic, 2, { reg::stringArg("recordKey"), reg::stringArg("entryKey") }, [](INTERNAL_FUNCTION_PARAMETERS) { |
| 1223 | + cls.method(sigs::lookupHash, [](INTERNAL_FUNCTION_PARAMETERS) { |
1222 | 1224 | zend_string *recordKey, *entryKey; |
1223 | 1225 | if (!zp::parse<zp::Str, zp::Str>(execute_data, recordKey, entryKey)) RETURN_THROWS(); |
1224 | 1226 | phpstanturbo::ArenaCache::lookupHash(recordKey, entryKey, return_value); |
1225 | 1227 | }); |
1226 | 1228 |
|
1227 | | - cls.method("lookupHashAll", reg::PublicStatic, 1, { reg::stringArg("recordKey") }, [](INTERNAL_FUNCTION_PARAMETERS) { |
| 1229 | + cls.method(sigs::lookupHashAll, [](INTERNAL_FUNCTION_PARAMETERS) { |
1228 | 1230 | zend_string *recordKey; |
1229 | 1231 | if (!zp::parse<zp::Str>(execute_data, recordKey)) RETURN_THROWS(); |
1230 | 1232 | phpstanturbo::ArenaCache::lookupHashAll(recordKey, return_value); |
1231 | 1233 | }); |
1232 | 1234 |
|
1233 | | - cls.method("publishHash", reg::PublicStatic, 2, { reg::stringArg("recordKey"), reg::arrayArg("entries") }, [](INTERNAL_FUNCTION_PARAMETERS) { |
| 1235 | + cls.method(sigs::publishHash, [](INTERNAL_FUNCTION_PARAMETERS) { |
1234 | 1236 | zend_string *recordKey; |
1235 | 1237 | HashTable *entries; |
1236 | 1238 | if (!zp::parse<zp::Str, zp::Ht>(execute_data, recordKey, entries)) RETURN_THROWS(); |
|
0 commit comments