CollectionSyncService.php
1 year ago
CustomerSyncService.php
1 year ago
PostSyncService.php
1 year ago
ProductSyncService.php
1 year ago
ProductsSyncProcess.php
1 year ago
ProductsSyncService.php
1 year ago
StoreSyncService.php
1 year ago
SyncService.php
1 year ago
SyncServiceProvider.php
1 year ago
SyncService.php
73 lines
| 1 | <?php |
| 2 | namespace SureCart\Sync; |
| 3 | |
| 4 | use SureCart\Background\Migration\ProductsSyncProcess; |
| 5 | use SureCart\Sync\CustomerSyncService; |
| 6 | use SureCart\Sync\ProductSyncService; |
| 7 | |
| 8 | /** |
| 9 | * The sync service. |
| 10 | */ |
| 11 | class SyncService { |
| 12 | /** |
| 13 | * Application instance. |
| 14 | * |
| 15 | * @var \SureCart\Application |
| 16 | */ |
| 17 | protected $app = null; |
| 18 | |
| 19 | /** |
| 20 | * Constructor. |
| 21 | * |
| 22 | * @param \SureCart\Application $app The application. |
| 23 | */ |
| 24 | public function __construct( $app ) { |
| 25 | $this->app = $app; |
| 26 | } |
| 27 | |
| 28 | /** |
| 29 | * Get the (multiple) products sync process. |
| 30 | * |
| 31 | * @return ProductsSyncProcess |
| 32 | */ |
| 33 | public function products() { |
| 34 | return $this->app->resolve( 'surecart.sync.products' ); |
| 35 | } |
| 36 | |
| 37 | /** |
| 38 | * Get the (single) product sync service. |
| 39 | * |
| 40 | * @return ProductSyncService |
| 41 | */ |
| 42 | public function product() { |
| 43 | return $this->app->resolve( 'surecart.sync.product' ); |
| 44 | } |
| 45 | |
| 46 | /** |
| 47 | * Get the (single) product sync service. |
| 48 | * |
| 49 | * @return ProductSyncService |
| 50 | */ |
| 51 | public function collection() { |
| 52 | return $this->app->resolve( 'surecart.sync.collection' ); |
| 53 | } |
| 54 | |
| 55 | /** |
| 56 | * Get the customer sync service. |
| 57 | * |
| 58 | * @return CustomerSyncService |
| 59 | */ |
| 60 | public function customers() { |
| 61 | return $this->app->resolve( 'surecart.sync.customers' ); |
| 62 | } |
| 63 | |
| 64 | /** |
| 65 | * Get the store sync service. |
| 66 | * |
| 67 | * @return StoreSyncService |
| 68 | */ |
| 69 | public function store() { |
| 70 | return $this->app->resolve( 'surecart.sync.store' ); |
| 71 | } |
| 72 | } |
| 73 |