Skip to content

Class ZugferdMailPlaceholderHelper

HorstOeko edited this page Dec 21, 2024 · 6 revisions

Summary

Class representing placeholder parser

Methods

fromArray [static]

Summary

Factory, init mapping table from an array

Signature

public static function fromArray(array $arr): \ZugferdMailPlaceholderHelper
{
}

Parameters

Name Type Allows Null Description
arr array

Returns

Returns a value of type \ZugferdMailPlaceholderHelper

fromZugferdDocumentReader [static]

Summary

Factory, init mapping table from ZugferdDocumentReader instance

Signature

public static function fromZugferdDocumentReader(
  horstoeko\zugferd\ZugferdDocumentReader $document,
): \ZugferdMailPlaceholderHelper
{
}

Parameters

Name Type Allows Null Description
document horstoeko\zugferd\ZugferdDocumentReader

Returns

Returns a value of type \ZugferdMailPlaceholderHelper

addPlaceholder

Summary

Add a placeholder with it's value to internal mapping table

Signature

public function addPlaceholder(string $placeholderName, mixed $placeHolderValue): \ZugferdMailPlaceholderHelper
{
}

Parameters

Name Type Allows Null Description
placeholderName string
placeHolderValue mixed

Returns

Returns a value of type \ZugferdMailPlaceholderHelper

parseString

Summary

Parses placeholders in $subject by the internal mapping table

Signature

public function parseString(string $subject): string
{
}

Parameters

Name Type Allows Null Description
subject string

Returns

Returns a value of type string