Logidav Docs

RebuildSaleProductShipmentsCommand extends ContainerAwareCommand
in package
uses LockableTrait

Table of Contents

Methods

configure()  : mixed
execute()  : mixed
countSaleProductsToProcess()  : int
decodeToArray()  : array<int, string>
encodeJsonOrNull()  : string|null
fetchColumnValues()  : array<int, mixed>
fetchExistingShipments()  : array<int, array<string|int, int>>
fetchSingleValue()  : mixed
formatDateForSql()  : string|null
formatDateTimeForSql()  : string|null
normalizeCarrierValue()  : string
normalizeIds()  : array<string|int, int>
normalizeNullableInt()  : int|null
normalizeNullableString()  : string|null
removeExistingShipments()  : void
resolveShipmentCreatedAt()  : DateTimeImmutable
toBoolInt()  : int
toDateTimeImmutable()  : DateTimeImmutable|null
yieldSaleProductRows()  : Generator<int, array<string, mixed>>

Methods

execute()

protected execute(InputInterface $input, OutputInterface $output) : mixed
Parameters
$input : InputInterface
$output : OutputInterface

countSaleProductsToProcess()

private countSaleProductsToProcess(Connection $connection, array<string|int, int> $saleIds, array<string|int, int> $saleProductIds, bool $force, DateTimeInterface $createdAfter) : int
Parameters
$connection : Connection
$saleIds : array<string|int, int>
$saleProductIds : array<string|int, int>
$force : bool
$createdAfter : DateTimeInterface
Return values
int

decodeToArray()

private decodeToArray(mixed $value[, bool $splitByComma = false ]) : array<int, string>
Parameters
$value : mixed
$splitByComma : bool = false
Return values
array<int, string>

fetchColumnValues()

private fetchColumnValues(object $statement) : array<int, mixed>
Parameters
$statement : object
Return values
array<int, mixed>

fetchExistingShipments()

private fetchExistingShipments(Connection $connection, array<string|int, int> $saleProductIds) : array<int, array<string|int, int>>
Parameters
$connection : Connection
$saleProductIds : array<string|int, int>
Return values
array<int, array<string|int, int>>

formatDateForSql()

private formatDateForSql(DateTimeInterface|null $value) : string|null
Parameters
$value : DateTimeInterface|null
Return values
string|null

formatDateTimeForSql()

private formatDateTimeForSql(DateTimeInterface|null $value) : string|null
Parameters
$value : DateTimeInterface|null
Return values
string|null

normalizeCarrierValue()

private normalizeCarrierValue(mixed $carrier, mixed $fallback) : string
Parameters
$carrier : mixed
$fallback : mixed
Return values
string

normalizeIds()

private normalizeIds(array<string|int, string> $values) : array<string|int, int>
Parameters
$values : array<string|int, string>
Return values
array<string|int, int>

removeExistingShipments()

private removeExistingShipments(Connection $connection, array<int, array<string|int, int>> $shipmentsMap) : void
Parameters
$connection : Connection
$shipmentsMap : array<int, array<string|int, int>>

resolveShipmentCreatedAt()

private resolveShipmentCreatedAt(array<string, mixed> $row, DateTimeImmutable $saleCreatedAt) : DateTimeImmutable
Parameters
$row : array<string, mixed>
$saleCreatedAt : DateTimeImmutable
Return values
DateTimeImmutable

toDateTimeImmutable()

private toDateTimeImmutable(mixed $value) : DateTimeImmutable|null
Parameters
$value : mixed
Return values
DateTimeImmutable|null

yieldSaleProductRows()

private yieldSaleProductRows(Connection $connection, array<string|int, mixed> $saleIds, array<string|int, mixed> $saleProductIds, bool $force, int $batchSize, DateTimeInterface $createdAfter) : Generator<int, array<string, mixed>>
Parameters
$connection : Connection
$saleIds : array<string|int, mixed>
$saleProductIds : array<string|int, mixed>
$force : bool
$batchSize : int
$createdAfter : DateTimeInterface
Return values
Generator<int, array<string, mixed>>

        
On this page

Search results