ProductDownloadStock
in package
Class ProductDownloadStock
Table of Contents
- STOCK_TYPE_ALWAYS_POSITIV = 'only-positive'
- STOCK_TYPE_MAY_BE_NEGATIVE = 'all-numbers'
- STOCK_TYPE_NOT_MANAGED = 'not-managed'
- ALLOWED_STOCK_TYPES = [self::STOCK_TYPE_ALWAYS_POSITIV, self::STOCK_TYPE_MAY_BE_NEGATIVE, self::STOCK_TYPE_NOT_MANAGED]
- $stock : float
- $stockType : string
- create() : ProductDownloadStock
- stock() : float
- stockType() : string
- __construct() : mixed
- ProductVariantStock constructor.
Constants
STOCK_TYPE_ALWAYS_POSITIV
public
mixed
STOCK_TYPE_ALWAYS_POSITIV
= 'only-positive'
STOCK_TYPE_MAY_BE_NEGATIVE
public
mixed
STOCK_TYPE_MAY_BE_NEGATIVE
= 'all-numbers'
STOCK_TYPE_NOT_MANAGED
public
mixed
STOCK_TYPE_NOT_MANAGED
= 'not-managed'
ALLOWED_STOCK_TYPES
private
mixed
ALLOWED_STOCK_TYPES
= [self::STOCK_TYPE_ALWAYS_POSITIV, self::STOCK_TYPE_MAY_BE_NEGATIVE, self::STOCK_TYPE_NOT_MANAGED]
Properties
$stock
private
float
$stock
$stockType
private
string
$stockType
Methods
create()
public
static create(float $stock[, string $stockType = ProductDownloadStock::STOCK_TYPE_NOT_MANAGED ]) : ProductDownloadStock
Parameters
- $stock : float
- $stockType : string = ProductDownloadStock::STOCK_TYPE_NOT_MANAGED
Return values
ProductDownloadStock —stock()
public
stock() : float
Return values
float —stockType()
public
stockType() : string
Return values
string —__construct()
ProductVariantStock constructor.
private
__construct(float $stock, string $stockType) : mixed
Parameters
- $stock : float
- $stockType : string