Maho_FeedManager_Model_Platform_AdapterInterface
in
Platform Adapter Interface
Defines the contract for platform-specific feed generation
Table of Contents
Methods
- getAllAttributes() : array<string, array{label: string, required: bool, description?: string, unit?: string, unit_target?: string}>
- Get all available attributes (required + optional)
- getCode() : string
- Get platform code
- getDefaultFormat() : string
- Get default file format
- getDefaultMappings() : array<string, array{source_type: string, source_value: string, use_parent?: string, transformers?: string}>
- Get default attribute mappings
- getDefaultXmlStructure() : array<int, array{tag: string, source_type: string, source_value: string, cdata: bool, optional: bool, use_parent?: string, transformers?: string, unit?: string, unit_target?: string}>
- Get the default XML builder structure for this platform
- getItemElement() : string
- Get feed item element name (for XML)
- getName() : string
- Get platform display name
- getNamespacedAttributes() : array<string|int, string>
- Get attributes that should use namespace prefix in XML output
- getNamespaces() : array<string, string>
- Get XML namespaces
- getOptionalAttributes() : array<string, array{label: string, required: bool, description?: string, unit?: string, unit_target?: string}>
- Get optional/recommended feed attributes
- getRequiredAttributes() : array<string, array{label: string, required: bool, description?: string, unit?: string, unit_target?: string}>
- Get required feed attributes for this platform
- getRootElement() : string
- Get feed root element name (for XML)
- getSupportedFormats() : array<string|int, string>
- Get supported file formats
- getTaxonomyFilePath() : string|null
- Get category taxonomy file path
- searchTaxonomy() : array<int, array{id: string, path: string}>
- Search taxonomy for matching categories
- supportsCategoryMapping() : bool
- Check if platform supports category mapping
- transformProductData() : array<string, mixed>
- Transform product data for this platform
- validateProductData() : array<string|int, string>
- Validate product data before including in feed
Methods
getAllAttributes()
Get all available attributes (required + optional)
public
getAllAttributes() : array<string, array{label: string, required: bool, description?: string, unit?: string, unit_target?: string}>
Return values
array<string, array{label: string, required: bool, description?: string, unit?: string, unit_target?: string}>getCode()
Get platform code
public
getCode() : string
Return values
stringgetDefaultFormat()
Get default file format
public
getDefaultFormat() : string
Return values
stringgetDefaultMappings()
Get default attribute mappings
public
getDefaultMappings() : array<string, array{source_type: string, source_value: string, use_parent?: string, transformers?: string}>
Return values
array<string, array{source_type: string, source_value: string, use_parent?: string, transformers?: string}>getDefaultXmlStructure()
Get the default XML builder structure for this platform
public
getDefaultXmlStructure() : array<int, array{tag: string, source_type: string, source_value: string, cdata: bool, optional: bool, use_parent?: string, transformers?: string, unit?: string, unit_target?: string}>
Each row is one element of an item, with the namespace prefix already applied to the tag name.
Return values
array<int, array{tag: string, source_type: string, source_value: string, cdata: bool, optional: bool, use_parent?: string, transformers?: string, unit?: string, unit_target?: string}>getItemElement()
Get feed item element name (for XML)
public
getItemElement() : string
Return values
stringgetName()
Get platform display name
public
getName() : string
Return values
stringgetNamespacedAttributes()
Get attributes that should use namespace prefix in XML output
public
getNamespacedAttributes() : array<string|int, string>
Return values
array<string|int, string>getNamespaces()
Get XML namespaces
public
getNamespaces() : array<string, string>
Return values
array<string, string>getOptionalAttributes()
Get optional/recommended feed attributes
public
getOptionalAttributes() : array<string, array{label: string, required: bool, description?: string, unit?: string, unit_target?: string}>
Return values
array<string, array{label: string, required: bool, description?: string, unit?: string, unit_target?: string}>getRequiredAttributes()
Get required feed attributes for this platform
public
getRequiredAttributes() : array<string, array{label: string, required: bool, description?: string, unit?: string, unit_target?: string}>
Return values
array<string, array{label: string, required: bool, description?: string, unit?: string, unit_target?: string}>getRootElement()
Get feed root element name (for XML)
public
getRootElement() : string
Return values
stringgetSupportedFormats()
Get supported file formats
public
getSupportedFormats() : array<string|int, string>
Return values
array<string|int, string>getTaxonomyFilePath()
Get category taxonomy file path
public
getTaxonomyFilePath() : string|null
Return values
string|nullsearchTaxonomy()
Search taxonomy for matching categories
public
searchTaxonomy(string $query[, int $limit = 10 ]) : array<int, array{id: string, path: string}>
Parameters
- $query : string
-
Search query
- $limit : int = 10
-
Maximum number of results
Return values
array<int, array{id: string, path: string}> —Array of matching categories
supportsCategoryMapping()
Check if platform supports category mapping
public
supportsCategoryMapping() : bool
Return values
booltransformProductData()
Transform product data for this platform
public
transformProductData(array<string, mixed> $productData) : array<string, mixed>
Parameters
- $productData : array<string, mixed>
-
Raw product data
Return values
array<string, mixed> —Transformed data
validateProductData()
Validate product data before including in feed
public
validateProductData(array<string, mixed> $productData) : array<string|int, string>
Parameters
- $productData : array<string, mixed>
Return values
array<string|int, string> —Validation errors (empty if valid)