/
var
/
www
/
barefootlaw.org
/
wp-content
/
plugins
/
wp-health
/
wpu-backup
/
src
/
Api
/
Upload File
HOME
<?php namespace WPUmbrellaBackup\Api; use GuzzleHttp\Client; abstract class BaseClient { protected $client= null; public function getHeaders($options = []) { $type = isset($options['type']) ? $options['type'] : 'json'; $headers = [ 'X-Project' => SITE_URL, 'X-Multisite' => IS_MULTISITE, 'X-Version' => WP_UMBRELLA_VERSION, 'Authorization' => 'Bearer ' . TOKEN ]; return $headers; } public function getClient(){ if($this->client !== null){ return $this->client; } $this->client = new Client([ 'base_uri' => WP_UMBRELLA_API_URL, 'headers' => $this->getHeaders() ]); return $this->client; } }