Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion Image/GraphViz.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ class Image_GraphViz
*
* @access public
*/
function Image_GraphViz($directed = true, $attributes = array(),
function __construct($directed = true, $attributes = array(),
$name = 'G', $strict = true, $returnError = false)
{
$this->setDirected($directed);
Expand All @@ -192,6 +192,29 @@ function Image_GraphViz($directed = true, $attributes = array(),
$this->_returnFalseOnError = !$returnError;
}

/**
* Compatibility constructor.
*
* @param boolean $directed Directed (TRUE) or undirected (FALSE) graph.
* Note: You MUST pass a boolean, and not just
* an expression that evaluates to TRUE or
* FALSE (i.e. NULL, empty string, 0 will NOT
* work)
* @param array $attributes Attributes of the graph
* @param string $name Name of the Graph
* @param boolean $strict Whether to collapse multiple edges between
* same nodes
* @param boolean $returnError Set to TRUE to return PEAR_Error instances
* on failures instead of FALSE
*
* @access public
*/
function Image_GraphViz($directed = true, $attributes = array(),
$name = 'G', $strict = true, $returnError = false)
{
self::__construct($directed, $attributes, $name, $strict, $returnError);
}

/**
* Outputs image of the graph in a given format
*
Expand Down