add( new JsonQueryTool(), new ConvertUnitsTool(), new DateCalcTool(), new UuidTool(), new HashTool(), ); $json = '{"data":{"items":[{"id":42,"name":"Морковка"}]}}'; // execute() возвращает строку и не бросает исключений — удобно для логирования. echo $registry->execute('json_query', ['json' => $json, 'path' => 'data.items[0].name']) . PHP_EOL; echo $registry->execute('json_query', ['json' => $json, 'path' => 'data.items[1].name']) . PHP_EOL; echo $registry->execute('convert_units', ['value' => 100, 'from' => 'km', 'to' => 'mi']) . PHP_EOL; echo $registry->execute('date_calc', ['from' => '2026-01-01', 'to' => '2026-12-31']) . PHP_EOL; echo $registry->execute('uuid', []) . PHP_EOL; echo $registry->execute('hash_text', ['text' => 'привет']) . PHP_EOL; // Неизвестный инструмент — текст ошибки, а не исключение. echo $registry->execute('nope', []) . PHP_EOL;