function CommerceGuysMarketplaceManagerBase::__construct in Commerce Guys Marketplace 7
Constructs a CommerceGuysMarketplaceManagerBase object.
Parameters
$client: An array with client credentials used to get an access token.
$endpoint: The endpoint url of the remote service.
$resource: The name of the resource managed by this class. Specified by the child class when calling the parent constructor.
2 calls to CommerceGuysMarketplaceManagerBase::__construct()
- CommerceGuysMarketplaceAddonManager::__construct in includes/
commerceguys_marketplace.addon.inc - Constructs a CommerceGuysMarketplaceAddonManager object.
- CommerceGuysMarketplaceTrainingManager::__construct in includes/
commerceguys_marketplace.training.inc - Constructs a CommerceGuysMarketplaceTrainingManager object.
2 methods override CommerceGuysMarketplaceManagerBase::__construct()
- CommerceGuysMarketplaceAddonManager::__construct in includes/
commerceguys_marketplace.addon.inc - Constructs a CommerceGuysMarketplaceAddonManager object.
- CommerceGuysMarketplaceTrainingManager::__construct in includes/
commerceguys_marketplace.training.inc - Constructs a CommerceGuysMarketplaceTrainingManager object.
File
- includes/
commerceguys_marketplace.base.inc, line 29
Class
- CommerceGuysMarketplaceManagerBase
- Defines the base manager class for interacting with remote marketplace items.
Code
function __construct($client, $endpoint, $resource = NULL) {
if (empty($resource)) {
throw new Exception("Cannot create an instance of marketplace manager without a specified resource.");
}
$this->client = $client;
$this->endpoint = $endpoint;
$this->resource = $resource;
}