Loading...
Loading...
HttpRequest/HttpResponse, Json/AjaxJson/Redirect, Uri, UuidGenerator. Use instead of $_GET/$_POST and raw headers.
npx skill4agent add bxmaximum/bitrix-framework-skills bitrix-request-responserules/*.mdrules/*.mdrules/application-context.mdrules/application-context.mdApplication and Contextrules/request.mdrules/request.mdHttpRequest and JSON bodyrules/response.mdrules/response.mdHttpResponse and typed responsesrules/uri-uuid.mdrules/uri-uuid.mdUri and UuidGeneratorBitrix\Main\Engine\Response\ConverterTO_SNAKETO_SNAKE_DIGITTO_CAMELTO_UPPERTO_LOWERLC_FIRSTUC_FIRSTKEYSVALUESRECURSIVEprocess($data)getFormat()setFormat($format)toJson()Converter::OUTPUT_JSON_FORMATKEYS | RECURSIVE | TO_CAMEL | LC_FIRSTVALUESuse Bitrix\Main\Engine\Response\Converter;
(new Converter(Converter::LC_FIRST | Converter::TO_CAMEL))->process('la_la_land'); // laLaLand
(new Converter(Converter::OUTPUT_JSON_FORMAT))->process([
'CATEGORIES' => [['ID' => 1, 'NAME' => 'Foods']],
]);
// ['categories' => [['id' => 1, 'name' => 'Foods']]] — 'Foods' stays untouched (no VALUES flag)/local/AGENTS.md