Logidav Docs

ImportMafProductsCommand extends ContainerAwareCommand
in package

Table of Contents

Constants

DEFAULT_DIRECTORY  = 'meduse/connectors/logidav/maf-products'
EXPECTED_HEADERS  = ['sku', 'name', 'description', 'price']
TARGET_STORE_ID  = 3

Properties

$defaultName  : mixed

Methods

configure()  : mixed
execute()  : mixed
getEntityManager()  : EntityManagerInterface
guessDelimiter()  : string
looksLikeHeader()  : bool
normalisePrice()  : float|null
normaliseRow()  : array<string, string|null>
openRemoteCsvStream()  : resource|false
resolveLatestCsv()  : string|null
stripBom()  : string

Constants

Properties

Methods

execute()

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

getEntityManager()

private getEntityManager() : EntityManagerInterface
Return values
EntityManagerInterface

guessDelimiter()

private guessDelimiter(string $sample) : string
Parameters
$sample : string
Return values
string

looksLikeHeader()

private looksLikeHeader(array<string|int, mixed> $row) : bool
Parameters
$row : array<string|int, mixed>
Return values
bool

normalisePrice()

private normalisePrice(string|null $raw) : float|null
Parameters
$raw : string|null
Return values
float|null

normaliseRow()

private normaliseRow(array<string|int, mixed> $row, array<string|int, mixed>|null $headerMap) : array<string, string|null>
Parameters
$row : array<string|int, mixed>
$headerMap : array<string|int, mixed>|null
Return values
array<string, string|null>

openRemoteCsvStream()

private openRemoteCsvStream(Ftp $ftp, string $remoteFile, OutputInterface $output) : resource|false
Parameters
$ftp : Ftp
$remoteFile : string
$output : OutputInterface
Return values
resource|false

resolveLatestCsv()

private resolveLatestCsv(Ftp $ftp, string $directory, OutputInterface $output) : string|null
Parameters
$ftp : Ftp
$directory : string
$output : OutputInterface
Return values
string|null

        
On this page

Search results