PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Images » Image_GraphViz » Bug #8295

One path to binaries

Details

Request #8295One path to binaries
Submitted2006-07-26 09:29 UTC
Fromtroelskn at gmail dot com
Assignedsebastian
StatusClosed
PackageImage_GraphViz
PHP VersionIrrelevant
Roadmaps(Not assigned)

Comments

[2006-07-26 09:29 UTC] troelskn at gmail dot com

Description:
------------
It would be helpful to have the path to binaries in one variable, rather than having to manually set $dotCommand + $neatoCommand.
The following diff puts this in one variable (binPath) :
Compare: (<)C:\PEAR\Image_GraphViz-1.2.1\Image_GraphViz-1.2.1\GraphViz.php (16097 bytes)
with: (>)C:\PEAR\Image_GraphViz-1.2.1\Image_GraphViz-1.2.1\GraphViz-new.php (16232 bytes)

105c105
< * Path to GraphViz/dot command
---
> * Path to GraphViz binaries
109,112c109,111
< var $dotCommand = 'dot';
<
< /**
< * Path to GraphViz/neato command
---
> var $binPath = '';
> /**
> * Path to GraphViz/dot command
116a115,121
> var $dotCommand = 'dot';
>
> /**
> * Path to GraphViz/neato command
> *
> * @var string
> */
204,211c210,218
< $command = $this->graph['directed'] ? $this->dotCommand : $this->neatoCommand;
< $command .= ' -T' . escapeshellarg($format) . ' -o' . escapeshellarg($outputfile) . ' ' . escapeshellarg($file);
<
< @`$command`;
< @unlink($file);
<
< $fp = fopen($outputfile, 'rb');
<
---
> $command = $this->binPath;
> $command .= $this->graph['directed'] ? $this->dotCommand : $this->neatoCommand;
> $command .= ' -T' . escapeshellarg($format) . ' -o' . escapeshellarg($outputfile) . ' ' . escapeshellarg($file);
>
> @`$command`;
> @unlink($file);
>
> $fp = fopen($outputfile, 'rb');
>
217,220c224,227
<
< return $data;
< }
<
---
>
> return $data;
> }
>
239,243c246,251
< $command = $this->graph['directed'] ? $this->dotCommand : $this->neatoCommand;
< $command .= ' -T' . escapeshellarg($format) . ' -o' . escapeshellarg($outputfile) . ' ' . escapeshellarg($dotfile);
<
< @`$command`;
<
---
> $command = $this->binPath;
> $command .= $this->graph['directed'] ? $this->dotCommand : $this->neatoCommand;
> $command .= ' -T' . escapeshellarg($format) . ' -o' . escapeshellarg($outputfile) . ' ' . escapeshellarg($dotfile);
>
> @`$command`;
>
521c529
<
---
>