Documentation

Shop
in package

YetiForce shop class.

Table of Contents

PREMIUM_ICONS  = [1 => 'yfi-premium color-red-600', 2 => 'yfi-enterprise color-yellow-600', 3 => 'yfi-partners color-grey-600']
PRODUCT_CATEGORIES  = ['All' => ['label' => 'LBL_CAT_ALL', 'icon' => 'yfi-all-shop'], 'CloudHosting' => ['label' => 'LBL_CAT_CLOUD_HOSTING', 'icon' => 'yfi-hosting-cloud-shop'], 'Support' => ['label' => 'LBL_CAT_SUPPORT', 'icon' => 'yfi-support-shop'], 'Addons' => ['label' => 'LBL_CAT_ADDONS', 'icon' => 'yfi-adds-on-shop'], 'Integrations' => ['label' => 'LBL_CAT_INTEGRATIONS', 'icon' => 'yfi-integration-shop'], 'PartnerSolutions' => ['label' => 'LBL_CAT_PARTNER_SOLUTIONS', 'icon' => 'yfi-partner-solution-shop']]
$productCache  : array<string|int, AbstractBaseProduct>
Product instance cache.
check()  : bool
Verification of product.
checkAlert()  : string
Check alert to show for product.
checkWithMessage()  : array<string|int, mixed>
Verification of product with a message.
generateCache()  : void
Generate cache.
getConfig()  : array<string|int, mixed>
Get additional configuration.
getFromCache()  : array<string|int, mixed>
Get from cache.
getPaypalUrl()  : string
Get paypal URL.
getProduct()  : AbstractBaseProduct
Get products.
getProducts()  : array<string|int, AbstractBaseProduct>
Get products.
getVariablePayments()  : array<string|int, mixed>
Get variable payments.
verify()  : string
Verify or show a message about invalid products.
verifyProductKey()  : bool
Verification of the product key.

Constants

PREMIUM_ICONS

public array<string|int, string> PREMIUM_ICONS = [1 => 'yfi-premium color-red-600', 2 => 'yfi-enterprise color-yellow-600', 3 => 'yfi-partners color-grey-600']

Premium icons.

PRODUCT_CATEGORIES

public array<string|int, mixed> PRODUCT_CATEGORIES = ['All' => ['label' => 'LBL_CAT_ALL', 'icon' => 'yfi-all-shop'], 'CloudHosting' => ['label' => 'LBL_CAT_CLOUD_HOSTING', 'icon' => 'yfi-hosting-cloud-shop'], 'Support' => ['label' => 'LBL_CAT_SUPPORT', 'icon' => 'yfi-support-shop'], 'Addons' => ['label' => 'LBL_CAT_ADDONS', 'icon' => 'yfi-adds-on-shop'], 'Integrations' => ['label' => 'LBL_CAT_INTEGRATIONS', 'icon' => 'yfi-integration-shop'], 'PartnerSolutions' => ['label' => 'LBL_CAT_PARTNER_SOLUTIONS', 'icon' => 'yfi-partner-solution-shop']]

Product categories.

Properties

Methods

check()

Verification of product.

public static check(string $productName) : bool
Parameters
$productName : string
Return values
bool

checkAlert()

Check alert to show for product.

public static checkAlert(string $productName) : string
Parameters
$productName : string
Return values
string

checkWithMessage()

Verification of product with a message.

public static checkWithMessage(string $productName) : array<string|int, mixed>
Parameters
$productName : string
Return values
array<string|int, mixed>

generateCache()

Generate cache.

public static generateCache() : void
Return values
void

getConfig()

Get additional configuration.

public static getConfig(string $name) : array<string|int, mixed>
Parameters
$name : string
Return values
array<string|int, mixed>

getFromCache()

Get from cache.

public static getFromCache() : array<string|int, mixed>
Return values
array<string|int, mixed>

getPaypalUrl()

Get paypal URL.

public static getPaypalUrl() : string

https://www.paypal.com/cgi-bin/webscr https://www.sandbox.paypal.com/cgi-bin/webscr.

Return values
string

getProducts()

Get products.

public static getProducts([string $state = '' ][, string $department = '' ]) : array<string|int, AbstractBaseProduct>
Parameters
$state : string = ''
$department : string = ''
Return values
array<string|int, AbstractBaseProduct>

getVariablePayments()

Get variable payments.

public static getVariablePayments([bool $isCustom = false ]) : array<string|int, mixed>
Parameters
$isCustom : bool = false
Return values
array<string|int, mixed>

verify()

Verify or show a message about invalid products.

public static verify([bool $cache = true ][, bool $onlyNames = false ]) : string
Parameters
$cache : bool = true
$onlyNames : bool = false
Return values
string

verifyProductKey()

Verification of the product key.

public static verifyProductKey(string $key) : bool
Parameters
$key : string
Return values
bool

        

Search results