OptionValueStock
in package
Class OptionValueStock
Tags
Table of Contents
- ALLOWED_STOCK_TYPES = [self::POSITIVE_STOCK_TYPE, self::NATURAL_STOCK_TYPE, self::NOT_MANAGED_STOCK_TYPE]
- NATURAL_STOCK_TYPE = 'all-numbers'
- NOT_MANAGED_STOCK_TYPE = 'not-managed'
- POSITIVE_STOCK_TYPE = 'only-positive'
- HIGHEST_STORABLE_FLOAT = 99999.9999
- MAXIMUM_DECIMAL_PLACES = 4
- $stock : float
- $stockCentrallyManaged : bool
- $stockType : string
- create() : OptionValueStock
- isStockCentrallyManaged() : bool
- stock() : float
- stockType() : string
- __construct() : mixed
- OptionValueStock constructor.
Constants
ALLOWED_STOCK_TYPES
public
mixed
ALLOWED_STOCK_TYPES
= [self::POSITIVE_STOCK_TYPE, self::NATURAL_STOCK_TYPE, self::NOT_MANAGED_STOCK_TYPE]
NATURAL_STOCK_TYPE
public
mixed
NATURAL_STOCK_TYPE
= 'all-numbers'
NOT_MANAGED_STOCK_TYPE
public
mixed
NOT_MANAGED_STOCK_TYPE
= 'not-managed'
POSITIVE_STOCK_TYPE
public
mixed
POSITIVE_STOCK_TYPE
= 'only-positive'
HIGHEST_STORABLE_FLOAT
private
mixed
HIGHEST_STORABLE_FLOAT
= 99999.9999
MAXIMUM_DECIMAL_PLACES
private
mixed
MAXIMUM_DECIMAL_PLACES
= 4
Properties
$stock
private
float
$stock
$stockCentrallyManaged
private
bool
$stockCentrallyManaged
$stockType
private
string
$stockType
Methods
create()
public
static create(string $stockType, float $stock, bool $stockCentrallyManaged) : OptionValueStock
Parameters
- $stockType : string
- $stock : float
- $stockCentrallyManaged : bool
Return values
OptionValueStock —isStockCentrallyManaged()
public
isStockCentrallyManaged() : bool
Return values
bool —stock()
public
stock() : float
Return values
float —stockType()
public
stockType() : string
Return values
string —__construct()
OptionValueStock constructor.
private
__construct(string $stockType, float $stock, bool $stockCentrallyManaged) : mixed
Parameters
- $stockType : string
- $stock : float
- $stockCentrallyManaged : bool