XmlWriter
Table of Contents
Methods
- __construct() : mixed
- Constructor.
- closeFile() : void
- Close the open file.
- getErrors() : array<string|int, mixed>
- Return errors if exists.
- openFile() : void
- Open file for write, start write xml.
- writeBeginTag() : void
- Write begin tag to file.
- writeEndTag() : void
- Write end tag to file.
- writeFullTag() : void
- Write full tag to file.
- writeItem() : void
- Write one chunk in xml file.
Methods
__construct()
Constructor.
public
__construct(array<string|int, mixed> $params) : mixed
Parameters
- $params : array<string|int, mixed>
-
Array of settings.
closeFile()
Close the open file.
public
closeFile() : void
getErrors()
Return errors if exists.
public
getErrors() : array<string|int, mixed>
Return values
array<string|int, mixed>openFile()
Open file for write, start write xml.
public
openFile() : void
writeBeginTag()
Write begin tag to file.
public
writeBeginTag(string $code) : void
Parameters
- $code : string
-
Code of tag.
writeEndTag()
Write end tag to file.
public
writeEndTag(string $code) : void
Parameters
- $code : string
-
Code of tag.
writeFullTag()
Write full tag to file.
public
writeFullTag(string $code, string $value) : void
Parameters
- $code : string
-
Code of tag.
- $value : string
-
Code for tag.
writeItem()
Write one chunk in xml file.
public
writeItem(array<string|int, mixed> $item[, string $wrapperTag = '' ]) : void
Parameters
- $item : array<string|int, mixed>
-
Data for write.
- $wrapperTag : string = ''
-
If != '' wrapper the array in this tag.