class Dia extends XMLWriter (View source)

This Class inherits the XMLwriter class and helps in developing structure of DIA Schema Export

Methods

__construct()

Upon instantiation This starts writing the Dia XML document

void
startDiaDoc(string $paper, float $topMargin, float $bottomMargin, float $leftMargin, float $rightMargin, string $orientation)

Starts Dia Document

void
endDiaDoc()

Ends Dia Document

void
showOutput(string $fileName)

Output Dia Document for download

Details

__construct()

Upon instantiation This starts writing the Dia XML document

See also

\XMLWriter::openMemory()
\XMLWriter::setIndent()
\XMLWriter::startDocument()

void startDiaDoc(string $paper, float $topMargin, float $bottomMargin, float $leftMargin, float $rightMargin, string $orientation)

Starts Dia Document

dia document starts by first initializing dia:diagram tag then dia:diagramdata contains all the attributes that needed to define the document, then finally a Layer starts which holds all the objects.

Parameters

string $paper

the size of the paper/document

float $topMargin

top margin of the paper/document in cm

float $bottomMargin

bottom margin of the paper/document in cm

float $leftMargin

left margin of the paper/document in cm

float $rightMargin

right margin of the paper/document in cm

string $orientation

orientation of the document, portrait or landscape

Return Value

void

See also

\XMLWriter::startElement()
\XMLWriter::writeAttribute()
\XMLWriter::writeRaw()

void endDiaDoc()

Ends Dia Document

Return Value

void

See also

\XMLWriter::endElement()
\XMLWriter::endDocument()

void showOutput(string $fileName)

Output Dia Document for download

Parameters

string $fileName

name of the dia document

Return Value

void

See also

\XMLWriter::flush()