| 1 |
<?php |
| 2 |
|
| 3 |
declare(strict_types=1); |
| 4 |
|
| 5 |
namespace Yatra\Hooks; |
| 6 |
|
| 7 |
/** |
| 8 |
* Action hook names used for usage telemetry and related lifecycle signals. |
| 9 |
* |
| 10 |
* Emitters call {@see do_action()} with these constants. {@see \Yatra\Services\StatsUsage} |
| 11 |
* registers listeners against the same values — keep them in sync only here. |
| 12 |
* |
| 13 |
* @see \Yatra\Services\BookingService::createBooking() BOOKING_CREATED |
| 14 |
* @see \Yatra\Repositories\TripRepository::createWithRelations() TRIP_CREATED_WITH_RELATIONS |
| 15 |
* @see \Yatra\Controllers\SetupWizardController::handle_wizard_submit() SETUP_WIZARD_COMPLETED |
| 16 |
* @see \Yatra\Controllers\PaymentGatewayController::save_gateway_config() PAYMENT_GATEWAY_CONFIG_SAVED |
| 17 |
*/ |
| 18 |
final class TelemetryHookNames |
| 19 |
{ |
| 20 |
public const BOOKING_CREATED = 'yatra_booking_created'; |
| 21 |
|
| 22 |
public const TRIP_CREATED_WITH_RELATIONS = 'yatra_trip_created_with_relations'; |
| 23 |
|
| 24 |
public const SETUP_WIZARD_COMPLETED = 'yatra_setup_wizard_completed'; |
| 25 |
|
| 26 |
public const PAYMENT_GATEWAY_CONFIG_SAVED = 'yatra_payment_gateway_config_saved'; |
| 27 |
} |
| 28 |
|