class Svg extends XMLWriter

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

Properties

$title
$author
$font
$fontSize

Methods

__construct()

The "PhpMyAdmin\Plugins\Schema\Svg\Svg" constructor

void
setTitle(string $value)

Set document title

void
setAuthor(string $value)

Set document author

void
setFont(string $value)

Set document font

string
getFont()

Get document font

void
setFontSize(integer $value)

Set document font size

integer
getFontSize()

Get document font size

void
startSvgDoc(integer $width, integer $height, integer $x = 0, integer $y = 0)

Starts RelationStatsSvg Document

void
endSvgDoc()

Ends RelationStatsSvg Document

void
showOutput(string $fileName)

output RelationStatsSvg Document

void
printElement(string $name, int $x, integer $y, int|string $width = '', int|string $height = '', string|null $text = '', string $styles = '')

Draws RelationStatsSvg elements

void
printElementLine(string $name, integer $x1, integer $y1, integer $x2, integer $y2, string $styles)

Draws RelationStatsSvg Line element

Details

at line 37
__construct()

The "PhpMyAdmin\Plugins\Schema\Svg\Svg" constructor

Upon instantiation This starts writing the RelationStatsSvg XML document

See also

at line 67
void setTitle(string $value)

Set document title

Parameters

string $value sets the title text

Return Value

void

at line 79
void setAuthor(string $value)

Set document author

Parameters

string $value sets the author

Return Value

void

at line 91
void setFont(string $value)

Set document font

Parameters

string $value sets the font e.g Arial, Sans-serif etc

Return Value

void

at line 101
string getFont()

Get document font

Return Value

string returns the font name

at line 113
void setFontSize(integer $value)

Set document font size

Parameters

integer $value sets the font size in pixels

Return Value

void

at line 123
integer getFontSize()

Get document font size

Return Value

integer returns the font size

at line 144
void startSvgDoc(integer $width, integer $height, integer $x = 0, integer $y = 0)

Starts RelationStatsSvg Document

svg document starts by first initializing svg tag which contains all the attributes and namespace that needed to define the svg document

Parameters

integer $width total width of the RelationStatsSvg document
integer $height total height of the RelationStatsSvg document
integer $x min-x of the view box
integer $y min-y of the view box

Return Value

void

See also

at line 171
void endSvgDoc()

Ends RelationStatsSvg Document

Return Value

void

See also

at line 189
void showOutput(string $fileName)

output RelationStatsSvg Document

svg document prompted to the user for download RelationStatsSvg document saved in .svg extension and can be easily changeable by using any svg IDE

Parameters

string $fileName file name

Return Value

void

See also

at line 227
void printElement(string $name, int $x, integer $y, int|string $width = '', int|string $height = '', string|null $text = '', string $styles = '')

Draws RelationStatsSvg elements

SVG has some predefined shape elements like rectangle & text and other elements who have x,y co-ordinates are drawn. specify their width and height and can give styles too.

Parameters

string $name RelationStatsSvg element name
int $x The x attr defines the left position of the element (e.g. x="0" places the element 0 pixels from the left of the browser window)
integer $y The y attribute defines the top position of the element (e.g. y="0" places the element 0 pixels from the top of the browser window)
int|string $width The width attribute defines the width the element
int|string $height The height attribute defines the height the element
string|null $text The text attribute defines the text the element
string $styles The style attribute defines the style the element styles can be defined like CSS styles

Return Value

void

See also

at line 270
void printElementLine(string $name, integer $x1, integer $y1, integer $x2, integer $y2, string $styles)

Draws RelationStatsSvg Line element

RelationStatsSvg line element is drawn for connecting the tables. arrows are also drawn by specify its start and ending co-ordinates

Parameters

string $name RelationStatsSvg element name i.e line
integer $x1 Defines the start of the line on the x-axis
integer $y1 Defines the start of the line on the y-axis
integer $x2 Defines the end of the line on the x-axis
integer $y2 Defines the end of the line on the y-axis
string $styles The style attribute defines the style the element styles can be defined like CSS styles

Return Value

void

See also