Application
extends Application
in package
This is the Application class in the SDK package.
All setting/getting operations are done through this class.
Tags
Table of Contents
ECOMMERCE | = 'ecommerce' | |
---|---|---|
LICENSES | = 'licenses' | |
PLUGINS | = 'plugins' | |
get() | Returns the data stored on the given application key id. | : mixed |
getCountriesSettings() | Returns the ecommerce settings countries. | : ElementCollection|null |
getCurrenciesSettings() | Returns the ecommerce settings currencies. | : ElementCollection|null |
getEcommerceLicenses() | Returns the ecommerce settings object. | : Licenses|null |
getEcommercePlugins() | Returns the ecommerce settings object. | : ElementCollection|null |
getEcommerceSettings() | Returns the ecommerce settings object. | : EcommerceSettings|null |
getInstance() | Returns the Application instance. | : Application|null |
getLanguagesSettings() | Returns the ecommerce settings Languages. | : ElementCollection|null |
getToken() | Returns the application token (JWT) given by the LogiCommerce API. | : string|null |
hasInValidData() | Returns if the application has been initialized and has valid data. | : bool |
refreshToken() | Refresh the application token. | : void |
setToken() | Sets the application token. | : void |
startApplication() | Start ecommerce Application Create cookie with the user identifier | : void |
getLicenses() | : Licenses | |
getPlugins() | : ElementCollection | |
getSettings() | : EcommerceSettings | |
set() | : void | |
setLicenses() | : void | |
setPlugins() | : void | |
setSettings() | : void |
Constants
ECOMMERCE
protected
mixed
ECOMMERCE
= 'ecommerce'
LICENSES
protected
mixed
LICENSES
= 'licenses'
PLUGINS
protected
mixed
PLUGINS
= 'plugins'
Methods
get()
Returns the data stored on the given application key id.
public
get(string $key) : mixed
Parameters
- $key : string
-
Key of the Application::$data you want to get.
Return values
mixed —getCountriesSettings()
Returns the ecommerce settings countries.
public
getCountriesSettings([string $languageCode = null ]) : ElementCollection|null
Parameters
- $languageCode : string = null
-
Optional. String that sets the language for the countries to be returned.
Return values
ElementCollection|null —getCurrenciesSettings()
Returns the ecommerce settings currencies.
public
getCurrenciesSettings() : ElementCollection|null
Return values
ElementCollection|null —getEcommerceLicenses()
Returns the ecommerce settings object.
public
getEcommerceLicenses() : Licenses|null
Return values
Licenses|null —getEcommercePlugins()
Returns the ecommerce settings object.
public
getEcommercePlugins() : ElementCollection|null
Return values
ElementCollection|null —getEcommerceSettings()
Returns the ecommerce settings object.
public
getEcommerceSettings() : EcommerceSettings|null
Return values
EcommerceSettings|null —getInstance()
Returns the Application instance.
public
static getInstance() : Application|null
If is not setted, this method will set it.
Return values
Application|null —getLanguagesSettings()
Returns the ecommerce settings Languages.
public
getLanguagesSettings() : ElementCollection|null
Return values
ElementCollection|null —getToken()
Returns the application token (JWT) given by the LogiCommerce API.
public
getToken() : string|null
Return values
string|null —hasInValidData()
Returns if the application has been initialized and has valid data.
public
hasInValidData() : bool
Return values
bool —refreshToken()
Refresh the application token.
public
refreshToken() : void
Return values
void —setToken()
Sets the application token.
public
setToken() : void
Return values
void —startApplication()
Start ecommerce Application Create cookie with the user identifier
public
startApplication([callable $setConstants = null ]) : void
Parameters
- $setConstants : callable = null
Tags
Return values
void —getLicenses()
protected
getLicenses() : Licenses
Return values
Licenses —getPlugins()
protected
getPlugins() : ElementCollection
Return values
ElementCollection —getSettings()
protected
getSettings() : EcommerceSettings
Return values
EcommerceSettings —set()
protected
set(string $key, mixed $value) : void
Parameters
- $key : string
- $value : mixed
Return values
void —setLicenses()
protected
setLicenses() : void
Tags
Return values
void —setPlugins()
protected
setPlugins() : void
Tags
Return values
void —setSettings()
protected
setSettings() : void