Documentation

Maho_FeedManager_Model_Writer_WriterInterface

Feed Writer Interface

Defines the contract for writing feed data to various formats

Table of Contents

Methods

close()  : void
Close the writer and finalize output
getFileExtension()  : string
Get the file extension for this format
getFormat()  : string
Get writer format code
getMimeType()  : string
Get the MIME type for this format
open()  : void
Open the writer for output
pause()  : void
Pause writing by closing the file handle without writing footer/closing tags
resume()  : void
Resume writing to an existing file in append mode
writeProduct()  : void
Write a single product entry

Methods

getFileExtension()

Get the file extension for this format

public getFileExtension() : string
Return values
string

getFormat()

Get writer format code

public getFormat() : string
Return values
string

getMimeType()

Get the MIME type for this format

public getMimeType() : string
Return values
string

pause()

Pause writing by closing the file handle without writing footer/closing tags

public pause() : void

Used by batch generation to release the file handle between HTTP requests. The file can be resumed later with resume().

resume()

Resume writing to an existing file in append mode

public resume(string $filePath[, Maho_FeedManager_Model_Platform_AdapterInterface|null $platform = null ]) : void

Used by batch generation to reopen a file across HTTP requests. Must be called instead of open() when continuing a previously started file.

Parameters
$filePath : string

Path to existing output file

$platform : Maho_FeedManager_Model_Platform_AdapterInterface|null = null

Platform adapter (needed by XML writer)

writeProduct()

Write a single product entry

public writeProduct(array<string, mixed> $productData) : void
Parameters
$productData : array<string, mixed>

Mapped product data

On this page

Search results