Documentation

Attribute
in package

Class representing a single GraphViz attribute.

Tags
link
http://phpdoc.org

Table of Contents

$key  : string
$value  : string
__construct()  : mixed
Creating a new attribute.
__toString()  : string
Returns the attribute definition as is requested by GraphViz.
getKey()  : string
Returns the name for this attribute.
getValue()  : string
Returns the value for this attribute.
isValueContainingSpecials()  : bool
Checks whether the value contains any any special characters needing escaping.
isValueInHtml()  : bool
Returns whether the value contains HTML.
setKey()  : self
Sets the key for this attribute.
setValue()  : self
Sets the value for this attribute.
encodeSpecials()  : string
Encode special characters so the escape sequences aren't removed

Properties

$key

protected string $key = ''

The name of this attribute

$value

protected string $value = ''

The value of this attribute

Methods

__construct()

Creating a new attribute.

public __construct(string $key, string $value) : mixed
Parameters
$key : string

Id for the new attribute.

$value : string

Value for this attribute,

Return values
mixed

__toString()

Returns the attribute definition as is requested by GraphViz.

public __toString() : string
Return values
string

getKey()

Returns the name for this attribute.

public getKey() : string
Return values
string

getValue()

Returns the value for this attribute.

public getValue() : string
Return values
string

isValueContainingSpecials()

Checks whether the value contains any any special characters needing escaping.

public isValueContainingSpecials() : bool
Return values
bool

isValueInHtml()

Returns whether the value contains HTML.

public isValueInHtml() : bool
Return values
bool

setKey()

Sets the key for this attribute.

public setKey(string $key) : self
Parameters
$key : string

The new name of this attribute.

Return values
self

setValue()

Sets the value for this attribute.

public setValue(string $value) : self
Parameters
$value : string

The new value.

Return values
self

Search results