CoolCMS API

ImportValue
in package

FinalYes

One scalar value from the source file, carrying the **line number** of its tag (the line log needs it).

Tri-state encoding:

  • tag missing: the key is absent from the field map (ImportVariantDto::$fields['weight'] === null),
  • tag with a value: ImportValue with a non-empty $raw,
  • empty tag (<publishTime/>): ImportValue with an empty $raw, isNullOut() is true.

$raw is the text 1:1 from the file (cdata descriptions are not sanitized here; that is the executor's job). getTrimmed() is for scalar fields where surrounding whitespace is meaningless.

Table of Contents

Properties

$lang  : string|null
$line  : int
$raw  : string

Methods

__construct()  : mixed
getTrimmed()  : string
isNullOut()  : bool
Explicit nulling of the field: the tag is present but empty.

Properties

Methods

__construct()

public __construct(string $raw, int $line[, string|null $lang = null ]) : mixed
Parameters
$raw : string
$line : int
$lang : string|null = null

getTrimmed()

public getTrimmed() : string
Return values
string

isNullOut()

Explicit nulling of the field: the tag is present but empty.

public isNullOut() : bool
Return values
bool
On this page

Search results