Download the PHP package osinet/grafizzi without Composer

On this page you can find all versions of the php package osinet/grafizzi. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package grafizzi

Grafizzi

Welcome to Grafizzi, a PHP wrapper for AT&T GraphViz.

Build codecov Scrutinizer Quality Score FOSSA Status

Using Grafizzi in your PHP GraphViz projects

Installing it in your project.

Generating graphs with Grafizzi

  1. Create a Pimple instance, passing it an instance for your PSR/3 logger of choice (e.g. Monolog) in the logger key, and possibly other arguments like directed to specify if you want to build a directed graph.
  2. Create a Graph instance, passing it the container.
  3. Add Subgraph, Node and Edge instances to the graph using the addChild() method. Each of these take the container and an array of Attribute instances in their constructor, or you can add them using setAttribute() after construction. Attribute instances are reusable on multiple elements.
  4. Invoke the build() method on the graph instance to obtain a string containing your Graphviz dot-file, which you can then output to a file or pipe to dot, neato or your Graphviz command of choice.
  5. Optional: use a chain of Filter instances to filter the result, for example to run Graphviz from your PHP script (DotFilter), or "tee" it between a filter pipe and a string (StringFilter).

You can take inspiration from the examples provided in the example/ directory:

Working on Grafizzi itself

Installing Grafizzi for development

Obtain the Grafizzi sources

The easiest way to get started is to clone the Git repository.

git clone https://github.com/fgm/grafizzi.git

Download the dependencies

Once you have a clone of the Grafizzi repository, you need to install its development dependencies, using the Composer package dependency manager.

Download Composer following the instructions on https://getcomposer.org/download/

Then run:

php composer.phar install

Note that Grafizzi is available for PHP ≥ 8.2.

Check your System Configuration

Now make sure that your local system is properly configured for Grafizzi. To do this, execute:

php example/hello-node.php

You should see a detailed debug execution trace. On a POSIX system, you can get just the resulting GraphViz source by redirecting stderr to /dev/null:

php example/hello-node.php 2> /dev/null

You should see a very basic GraphViz source:

graph g {
  rankdir="TB";
  label="Some graph";

  n1 [ label="Some node" ];
  n2 [ label="Other node" ];
  n1 -- n2;
} /* /graph g */

If you get any warnings or recommendations, or nothing at all, check your PHP error log, and fix these now before moving on.

Verifying the Grafizzi code

If your system includes the make command, after installing, run:

make lint

You should get a green bar with zero warnings.

Generating documentation

If your system includes the make and `doxygen' commands, and GraphViz itself, you can generate a fully indexed source documentation by running:

make docs

This will generate a HTML documentation with internal search engine in the doxygen/ directory. Use it by browsing to doxygen/html/index.html.

The documentation and search engine are even usable over file:/// URLs, so you do not need a web server to access it.

Running tests

If you want to make sure that Grafizzi runs fine on your system, run:

make test

Note that the Composer installation in dev mode will have installed PHPunit in your vendor folder.

Cleaning up

You can remove php_error.log, the generated doxygen docs directory, the generated coverage reports, and many stray generated files by running:

make clean

This will not remove the vendor/ directory.

Have fun!

License

FOSSA Status

Changelog


All versions of grafizzi with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8.1
pimple/pimple Version ^v3.5.0
psr/log Version ^1.1.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package osinet/grafizzi contains the following files

Loading the files please wait ....