Dieses Projekt ist einer Prä-Alpha-Phase und erhebt keinen Anspruch auf Funktionalität oder Eleganz. Feedback ist höchst willkommen.
Wenn Sie eine Möglichkeit suchen, während der Programmausführung eine Liste der inkludierten Dateien zu erhalten, verwenden Sie inclued von Gopal Vijayaraghavan oder get_included_files() .
23. Juli 2010
Den GozintograPHP gibt es nun auch auf Facebook.
23. Juli 2010
Der aktuelle Entwicklungszweig liegt nun bei GitHub.
Der GozintograPHP ist ein Gozintograph für PHP-Applikationen, geschrieben in PHP.
In der Produktionswirtschaft dient der Gozintograph als Funktionsgraph zur Visualisierung der Zusammensetzung eines Produkts. So wie ein Industrieprodukt aus mehreren Bauteilen bestehen kann, kann auch eine Webapplikation aus einer Mehrzahl aus Programmdateien bestehen, die ineinander inkludiert werden können. Besteht ein Programm nur aus einer geringen Anzahl dieser zu inkludierenden Dateien, ist die Organisation nicht schwierig. Wächst jedoch die Anzahl der zu inkludierenden Dateien oder muss eine Applikation betreut werden, die bisher unbekannt ist und aus einer Vielzahl von Programmdateien besteht, benötigt man einen einfachen Überblick. Diesen soll der GozintograPHP bieten.
Der GozintograPHP verwendet die Tokenizer-Funktionen der Zend Engine um eine statische Quelltextanalyse vorzunehmen. Der GozintograPHP erzeugt aus den gefundenen Daten eine XML-Struktur, die mit weiteren Werkzeugen verarbeitet werden kann. Der GozintograPHP ist ein Kommandozeilenwerkzeug.
Gegeben sei die Datei demo.php.
<?php
/**
* GozintograPHP Demo Script
*
* This ist for GozintograPHP documentation purposes <b>only</b>.
* Don't use this demo file standalone.
*
* @link http://gozintographp.org
* @package GozintograPHP
* @author Christoph Jeschke <gozintographp@cj-soft.de>
* @version $Id: index.de 21 2010-08-31 08:39:09Z jeschkec $
* @copyright Christoph Jeschke
*/
// Abort if run standalone
die("This is only for GozintograPHP demonstration purposes. Aborting.\n");
/**
* include foo.php
*/
include 'foo.php';
/**
* include foo.php
*/
include "foo.php";
/**
* include_one bar.php
*/
include_once 'bar.php';
/**
* require foo.php
*/
require 'foo.php';
/**
* require_once bar.php
*/
require_once 'bar.php';
/**
* include file referenced by $foo
*/
include $foo;
?>
Mit Hilfe des GozintograPHP gozintogra.php wird die Datei in eine XML-Struktur übersetzt. Diese wird in demo.xml gesichert.
# gozintogra.php demo.php > demo.xml
Mit xmllint kann diese lesbar reformatiert werden.
<?xml version="1.0"?>
<map>
<source file="demo.php">
<entry method="include" target="foo.php"/>
<entry method="include_once" target="bar.php"/>
<entry method="require" target="foo.php"/>
<entry method="require_once" target="bar.php"/>
<entry method="include" target="$foo"/>
</source>
</map>
Das in support-files/ mitgelieferte Perl-Skript gozintogra.php-graphviz kann aus der XML-Struktur mit Hilfe von GraphViz einen Graphen erstellen.
# gozintographp-graphviz demo.xml > demo.png

Der GozintograPHP ist unter einer BSD-Lizenz veröffentlicht.
GozintograPHP -------------------------------------------------------------------- Copyright (c) 2008 Christoph Jeschke <jeschkec@gozintographp.org> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Die aktuellste Version finden Sie in meinem Git Repository.
Bitte lesen Sie zuerst die Lizenz bevor Sie die Software verwenden. Mit dem Download akzeptieren Sie diese uneingeschränkt.
| Dateiname | Version | Größe | Datum |
|---|---|---|---|
| gozintographp-0.0.3.tar.gz | 0.0.3 | 68 kiB | 24.01.2009 |
| gozintographp-0.0.2.tar.gz | 0.0.2 | 25 kiB | 25.10.2008 |
| gozintographp-0.0.1.tar.gz | 0.0.1 | 31 kiB | 12.10.2008 |
$Id: index.de 21 2010-08-31 08:39:09Z jeschkec $