__call()
__get()
__set()
__toString()
addGraph()
create()
export()
findNode()
getGraph()
getName()
getType()
hasGraph()
link()
setName()
setNode()
setType()
$attributes
$edges
$graphs
$name
$nodes
$type
Class representing a graph; this may be a main graph but also a subgraph.
In case of a subgraph: When the name of the subgraph is prefixed with cluster then the contents of this graph will be grouped and a border will be added. Otherwise it is used as logical container to place defaults in.
| category | phpDocumentor |
|---|---|
| package | GraphViz |
| author | Mike van Riel |
| copyright | 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) |
| license | MIT |
| link | http://phpdoc.org |
__call(string $name, \mixed[] $arguments) : \phpDocumentor_GraphViz_Attribute[] | \phpDocumentor_GraphViz_Graph | null
Using this method we make sure that we support any attribute without too much hassle. If the name for this method does not start with get or set we return null.
Set methods return this graph (fluent interface) whilst get methods return the attribute value.
stringName of the method including get/set
\mixed[]The arguments, should be 1: the value
__get(string $name) : \phpDocumentor_GraphViz_Node
| see | \phpDocumentor_GraphViz_Graph::setNode() |
|---|
stringThe name of the node to retrieve.
__set(string $name, \phpDocumentor_GraphViz_Node $value) : void
| see | \phpDocumentor_GraphViz_Graph::setNode() |
|---|
stringName of the node.
__toString() : string
GraphViz is not used in this method; it is safe to call it even without GraphViz installed.
stringaddGraph(phpDocumentor_GraphViz_Graph $graph) : \phpDocumentor_GraphViz_Graph
Please note that an index is maintained using the name of the subgraph. Thus if you have 2 subgraphs with the same name that the first will be overwritten by the latter.
| see | \phpDocumentor_GraphViz_Graph::create() |
|---|
create(string $name, bool $directional) : \phpDocumentor_GraphViz_Graph
stringThe name for this graph.
boolWhether this is a directed or undirected graph.
export(string $type, string $filename) : \phpDocumentor_GraphViz_Graph
This is the only method that actually requires GraphViz.
| uses | \GraphViz/dot |
|---|---|
| link | http://www.graphviz.org/content/output-formats |
stringThe type to export to; see the link above for a list of supported types.
stringThe path to write to.
\phpDocumentor_GraphViz_Exception |
if an error occurred in GraphViz. |
|---|
findNode(string $name) : \phpDocumentor_GraphViz_Node
getName() : string
stringgetType() : string
stringhasGraph(string $name) : bool
stringName of the graph to find.
boollink(phpDocumentor_GraphViz_Edge $edge) : \phpDocumentor_GraphViz_Graph
| see | \phpDocumentor_GraphViz_Edge::create() |
|---|
setName(string $name) : \phpDocumentor_GraphViz_Graph
If this is a subgraph you can prefix the name with cluster to group all contained nodes and add a border.
stringThe new name for this graph.
setNode(phpDocumentor_GraphViz_Node $node) : \phpDocumentor_GraphViz_Graph
Nodes can be retrieved by retrieving the property with the same name. Thus 'node1' can be retrieved by invoking: $graph->node1
| see | \phpDocumentor_GraphViz_Node::create() |
|---|
setType(string $type) : \phpDocumentor_GraphViz_Graph
stringMust be either "digraph", "graph" or "subgraph".
\InvalidArgumentException |
if $type is not "digraph", "graph" or "subgraph". |
|---|
$name : string
$type : string