| 1 |
<?php if ( ! defined( 'ABSPATH' ) ) exit; ?> |
| 2 |
<?php |
| 3 |
|
| 4 |
/** |
| 5 |
* Add only the plugin specific bindings here. |
| 6 |
* |
| 7 |
* @var $app \FluentCart\Framework\Foundation\Application |
| 8 |
*/ |
| 9 |
|
| 10 |
use FluentCart\App\App; |
| 11 |
use FluentCart\App\Modules\PaymentMethods\Core\GatewayManager; |
| 12 |
use \FluentCart\App\Services\Localization\LocalizationManager; |
| 13 |
|
| 14 |
$app->singleton(\FluentCart\Api\StoreSettings::class); |
| 15 |
$app->alias(\FluentCart\Api\StoreSettings::class, 'store_settings'); |
| 16 |
|
| 17 |
// Payment Gateway Manager binding |
| 18 |
$app->singleton(GatewayManager::class, function($app) { |
| 19 |
return GatewayManager::getInstance(); |
| 20 |
}); |
| 21 |
$app->alias(GatewayManager::class, 'gateway'); |
| 22 |
|
| 23 |
|
| 24 |
// Localization Manager binding |
| 25 |
$app->singleton(LocalizationManager::class, function($app) { |
| 26 |
return LocalizationManager::getInstance(); |
| 27 |
}); |
| 28 |
$app->alias(LocalizationManager::class, 'localization'); |
| 29 |
|
| 30 |
|
| 31 |
//$app->singleton(Store::class, function($app) { |
| 32 |
// $config = $app->make('config')->get('session'); |
| 33 |
// return new Store('fluentcart_session', new DatabaseSessionHandler( |
| 34 |
// $app->make('db'), |
| 35 |
// $config['table'], |
| 36 |
// $config['lifetime'], |
| 37 |
// $app |
| 38 |
// )); |
| 39 |
//}); |
| 40 |
// |
| 41 |
//$app->alias(Store::class, 'session'); |
| 42 |
|