# sync-basalam/1.10.19/includes/Services/ApiServiceManager.php

ووسلام – همگام سازی ووکامرس و باسلام, version 1.10.19. 59 lines.

- Page: https://pluginprobe.com/plugins/sync-basalam/1.10.19/code/includes/Services/ApiServiceManager.php
- Raw: https://pluginprobe.com/plugins/sync-basalam/1.10.19/raw/includes/Services/ApiServiceManager.php
- Modified: 2026-09-17T09:40:56+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/sync-basalam/1.10.19/code/includes/Services/ApiServiceManager.php#L10-L20`.

```php
<?php

namespace SyncBasalam\Services;

use SyncBasalam\Services\Api\PostApiService;
use SyncBasalam\Services\Api\GetApiService;
use SyncBasalam\Services\Api\PatchApiService;
use SyncBasalam\Services\Api\PutApiService;
use SyncBasalam\Services\Api\DeleteApiService;
use SyncBasalam\Services\Api\FileUploadApiService;

defined('ABSPATH') || exit;

class ApiServiceManager
{
    private $postService = null;
    private $getService = null;
    private $patchService = null;
    private $putService = null;
    private $deleteService = null;
    private $fileUploadService = null;

    public function post($url, $data, $headers = [])
    {
        if ($this->postService === null) $this->postService = new PostApiService();
        return $this->postService->send($url, $data, $headers);
    }

    public function get($url, $headers = [])
    {
        if ($this->getService === null) $this->getService = new GetApiService();
        return $this->getService->send($url, $headers);
    }

    public function patch($url, $data, $headers = [])
    {
        if ($this->patchService === null) $this->patchService = new PatchApiService();
        return $this->patchService->send($url, $data, $headers);
    }

    public function put($url, $data, $headers = [])
    {
        if ($this->putService === null) $this->putService = new PutApiService();
        return $this->putService->send($url, $data, $headers);
    }

    public function delete($url, $headers = [], $data = null)
    {
        if ($this->deleteService === null) $this->deleteService = new DeleteApiService();
        return $this->deleteService->send($url, $headers, (array) $data);
    }

    public function upload($url, $localFile, $data = [], $headers = [], $options = [])
    {
        if ($this->fileUploadService === null) $this->fileUploadService = new FileUploadApiService();
        return $this->fileUploadService->upload($url, $localFile, $data, $headers, $options);
    }
}

```
