CachedPropertyReader
extends PropertyReader
in package
Class PropertyReader
Table of Contents
- $cache : array<string|int, mixed>
- $cheapestCombinationFor : mixed
- $getCombinationModifierIds : mixed
- $getCombinationsFor : mixed
- $hasNonLinearSurcharge : mixed
- $hasProperties : mixed
- $hasSurcharge : mixed
- $numberOfProperties : mixed
- $builder : CombinationBuilderInterface
- $checkStockBeforeShoppingCartCriteria : CheckStockBeforeShoppingCartCriteria
- $checkStockCriteria : CheckStockCriteria
- $connection : Connection
- __construct() : mixed
- PropertyReader constructor.
- getCheapestCombinationFor() : mixed|void
- getCombinationFor() : mixed
- getCombinationModifierIds() : ModifierIdentifierCollectionInterface
- getCombinationsFor() : CombinationCollectionInterface
- hasProperties() : mixed
- activeLanguageId() : int
- createCombination() : Combination
- createQuery() : string
- createSurcharge() : CombinationSurcharge|null
- createVpe() : Vpe|null
- filterProperties() : array<string|int, string>
- filterStock() : string
- getCombinationStockConfiguration() : int
- getNumberOfProperties() : int
- hasNonLinearSurcharge() : bool
- hasSurcharge() : bool
- isCheapest() : bool
Properties
$cache
protected
array<string|int, mixed>
$cache
= ['getCombinationModifierIds' => [], 'hasProperties' => []]
$cheapestCombinationFor
protected
static mixed
$cheapestCombinationFor
= []
$getCombinationModifierIds
protected
static mixed
$getCombinationModifierIds
= []
$getCombinationsFor
protected
static mixed
$getCombinationsFor
= []
$hasNonLinearSurcharge
protected
static mixed
$hasNonLinearSurcharge
= []
$hasProperties
protected
static mixed
$hasProperties
= []
$hasSurcharge
protected
static mixed
$hasSurcharge
= []
$numberOfProperties
protected
static mixed
$numberOfProperties
= []
$builder
private
CombinationBuilderInterface
$builder
$checkStockBeforeShoppingCartCriteria
private
CheckStockBeforeShoppingCartCriteria
$checkStockBeforeShoppingCartCriteria
$checkStockCriteria
private
CheckStockCriteria
$checkStockCriteria
$connection
private
Connection
$connection
Methods
__construct()
PropertyReader constructor.
public
__construct(Connection $connection, CombinationBuilderInterface $builder, CheckStockBeforeShoppingCartCriteria $checkStockBeforeShoppingCartCriteria, CheckStockCriteria $checkStockCriteria) : mixed
Parameters
- $connection : Connection
- $builder : CombinationBuilderInterface
- $checkStockBeforeShoppingCartCriteria : CheckStockBeforeShoppingCartCriteria
- $checkStockCriteria : CheckStockCriteria
Return values
mixed —getCheapestCombinationFor()
public
getCheapestCombinationFor(SellingUnitId $id) : mixed|void
Parameters
- $id : SellingUnitId
Tags
Return values
mixed|void —getCombinationFor()
public
getCombinationFor(SellingUnitId $id) : mixed
Parameters
- $id : SellingUnitId
Tags
Return values
mixed —getCombinationModifierIds()
public
getCombinationModifierIds(int $combinationId) : ModifierIdentifierCollectionInterface
Parameters
- $combinationId : int
Tags
Return values
ModifierIdentifierCollectionInterface —getCombinationsFor()
public
getCombinationsFor(SellingUnitId $id[, int $limit = 2 ]) : CombinationCollectionInterface
Parameters
- $id : SellingUnitId
- $limit : int = 2
Tags
Return values
CombinationCollectionInterface —hasProperties()
public
hasProperties(ProductId $productId) : mixed
Parameters
- $productId : ProductId
Tags
Return values
mixed —activeLanguageId()
protected
activeLanguageId() : int
Return values
int —createCombination()
protected
createCombination(array<string|int, mixed> $row, bool $nonLinearSurcharge[, bool $cheapest = false ]) : Combination
Parameters
- $row : array<string|int, mixed>
- $nonLinearSurcharge : bool
- $cheapest : bool = false
Return values
Combination —createQuery()
protected
createQuery(int $productId[, string $whereAnd = '' ][, string $having = '' ][, int $limit = 2 ]) : string
Parameters
- $productId : int
- $whereAnd : string = ''
- $having : string = ''
- $limit : int = 2
Return values
string —createSurcharge()
protected
createSurcharge(string $type, float $surcharge, bool $nonLinear) : CombinationSurcharge|null
Parameters
- $type : string
- $surcharge : float
- $nonLinear : bool
Return values
CombinationSurcharge|null —createVpe()
protected
createVpe(int $id, string $name, float $value) : Vpe|null
Parameters
- $id : int
- $name : string
- $value : float
Return values
Vpe|null —filterProperties()
protected
filterProperties(SellingUnitId $id) : array<string|int, string>
Parameters
- $id : SellingUnitId
Return values
array<string|int, string> —filterStock()
protected
filterStock(SellingUnitId $id) : string
Parameters
- $id : SellingUnitId
Tags
Return values
string —getCombinationStockConfiguration()
protected
getCombinationStockConfiguration(int $productId) : int
Parameters
- $productId : int
Tags
Return values
int —getNumberOfProperties()
protected
getNumberOfProperties(ProductId $productId) : int
Parameters
- $productId : ProductId
Tags
Return values
int —hasNonLinearSurcharge()
protected
hasNonLinearSurcharge(int $productId) : bool
Parameters
- $productId : int
Tags
Return values
bool —hasSurcharge()
protected
hasSurcharge(int $productId) : bool
Parameters
- $productId : int
Tags
Return values
bool —isCheapest()
protected
isCheapest(SellingUnitId $id) : bool
Parameters
- $id : SellingUnitId