Pear phpDocumentor

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • Pear phpDocumentor

    Hey,

    hab mir heute mal das Dokumentationspaket Pear phpDocumentor angeschaut und wollte das mal testen aber leider möchte er mich mit Fehlermeldungen nerven.

    Die Errors im Einzelnen:
    css_stats_class.php
    Warnings:

    Warning on line 13 - DocBlock would be page-level, but precedes class "css_stats", use another DocBlock to document the file

    index.php
    Warnings:

    Warning on line 15 - Page-level DocBlock precedes "require index.php", use another DocBlock to document the source element

    popup.php
    Warnings:

    Warning on line 14 - Page-level DocBlock precedes "require popup.php", use another DocBlock to document the source element


    Documentation generated on Sat, 19 Feb 2005 13:18:31 +0100 by phpDocumentor 1.2.3
    Die Class
    <?
    1/**
    * @package css_stats
    * @author POD <pod@web.de>
    * @version 1.0
    *
    6* This program is free software; you can redistribute it and/or modify
    * it under the terms of the GNU General Public License as published by
    * the Free Software Foundation; either version 2 of the License, or
    * (at your option) any later version.
    *
    */
    class css_stats
    {
    var $error_markup = '<font color="red">%s</font>';
    15 var $url = '<a href="%s?order=%s&orderby=%s">%s</a>';
    die index.php
    <?
    1 /**
    *
    * @package css_stats
    * @author pod <pod@web.de>
    * @version 1.0
    6 *
    *
    * This program is free software; you can redistribute it and/or modify
    * it under the terms of the GNU General Public License as published by
    * the Free Software Foundation; either version 2 of the License, or
    * (at your option) any later version.
    *
    13 */
    require "css_stats_class.php";
    15 require "config.inc.php";
    Popup ist nahezu im Schema identisch wie die File zuvor......

    Als einzigstes hat die config.inc.php funktioniert die bemängelt er nicht:
    /**
    * @package example
    * @author Pod <pod@web.de>
    * @version 1.0
    *
    * This program is free software; you can redistribute it and/or modify
    * it under the terms of the GNU General Public License as published by
    * the Free Software Foundation; either version 2 of the License, or
    * (at your option) any later version.
    *
    */
    $ftp_server='xxxx';
    $ftp_user='xxxx';
    $ftp_pw='xxxx';
    $ftp_file='/blabl/blubb/blaa';
    ....
    ...
    ...
    Die Fehlermeldung die in der Klasse bemängelt wird ist für mich unbegreiflich....Der Docblock würde auf der Seitenebene sein, aber die Klasse css_stats ist davor (vor sich selber? k). Man solle einen anderen DocBlock fürs dokumentieren verwenden......

    *grübel*

    Und in den anderen Files ist vermutlich das require schuldig, muss das mal testen.....

    Irgendwelche Ideen?
    Wenn es damit nicht klappt versuch ich mal http://phpxref.sourceforge.net/
    oder ich dokumentier weiter händisch
    Zuletzt geändert von Payne_of_Death; 19.02.2005, 15:05.
    [color=blue]MfG Payne_of_Death[/color]

    [color=red]Manual(s):[/color] <-| PHP | MySQL | SELFHTML |->
    [color=red]Merke:[/color]
    [color=blue]Du brauchst das Rad nicht neu erfinden ! [/color]<-ForumSuche rettet Leben-> || <-Schau in den Codeschnippsels->

    Murphy`s Importanst LAWS
    Jede Lösung bringt nur neue Probleme
    Das Fluchen ist die einzige Sprache, die jeder Programmierer beherrscht.
    In jedem kleinen Problem steckt ein großes, das gern raus moechte.

  • #2
    Hallo,

    ich hatte auch so meine Probleme mit PHP 5 und dem phpDocumentor 1.2.3. Ich hatte andere Fehlermeldungen aber es war nichts zu machen. Ich hab jetzt den phpDocumentor 1.3.0 RC3 installiert und der läuft problemlos. phpDocumentor hat auch einige Dependencies, z.B. mbstring. Check sonst mal ob Du da alle hast.

    Ich kommentier meine Klassen folgendermaßen. Das scheint einwandrei zu funktionieren. Vielleicht hilfts ja was...
    PHP-Code:
    <?php

    require_once("dbCustomConfig.php");

    /**
     * CustomDatabase (PHP 5)
     * 
     * Datenbankabstraktionslayer, der eine Verbindung zu einem MySQL-, MS-SQL-
     * oder PostgreSQL-Server aufbauen kann und grundlegende
     * Datenbankzugriffsfunktionen bietet
     * 
     * @package    DBLayerCustom
     */
    class CustomDatabase {
        
        
    /**
         * Resource-Link fuer die Datenbankverbindung
         * 
         * @var       resource
         * @access    protected
         */
        
    protected $connection;
        
        
    /**
         * Konstruktor, der eine Verbindung zum Datenbankserver herstellt und die
         * uebergebene Datenbank auswaehlt
         * 
         * @return    void
         * @access    protected
         */
        
    protected function __construct() {
            global 
    $dbCustomConfig;
            
            
    $connectString "\$this->connection = @".$dbCustomConfig["type"]."_connect(";
            if (
    $dbCustomConfig["type"] == "mysql" || $dbCustomConfig["type"] == "mssql") {
                
    $connectString .= $dbCustomConfig["host"].", ";
                
    $connectString .= $dbCustomConfig["username"].", ";
                
    $connectString .= $dbCustomConfig["password"];
            }
            if (
    $dbCustomConfig["type"] == "pg") {
                
    $connectString .= "\"host=".$dbCustomConfig["host"]." ";
                
    $connectString .= "port=5432 ";
                
    $connectString .= "dbname=".$dbCustomConfig["databaseName"]." ";
                
    $connectString .= "user=".$dbCustomConfig["username"]." ";
                
    $connectString .= "password=".$dbCustomConfig["password"]."\"";
            }
            
    $connectString .= ");";
            eval(
    $connectString);
            
            if (
    $dbCustomConfig["type"] == "mysql" || $dbCustomConfig["type"] == "mssql") {
                
    $dbSelectionString $dbCustomConfig["type"]."_select_db(\"";
                
    $dbSelectionString .= $dbCustomConfig["databaseName"]."\", \$this->connection";
                
    $dbSelectionString .= ");";
                eval(
    $dbSelectionString);
            }
            
            if (!
    is_resource($this->connection)) {
                
    $exceptionString "Can't connect to database using \"".$connectString."\".";
                throw new 
    Exception($exceptionString);
            }
        }
        
        
    /**
         * Gibt eine Instanz der Klasse zurueck
         * 
         * @return    Database    Instanz der Klasse
         * @access    public
         * @static
         */
        
    public static function instance() {
            static 
    $instance;
            
            if (
    $instance == null) {
                
    $instance = new CustomDatabase();
            }
            
            return 
    $instance;
        }
        
        ...

    ?>
    Nach diesem Schema läufts bei mir einwandfrei.

    Lars
    Zuletzt geändert von Lars79; 25.06.2005, 14:13.

    Kommentar


    • #3
      Ab Mittwoch gibts ja auch das neue Zend Studio 4 mit integriertem Dokumentator, falls du da ne Lizenz hast...

      *darauf freu*
      Für alle die Fehler suchen, gibts gratis tolle Debuggingmöglichkeiten:
      var_dump(), print_r(), debug_backtrace und echo.
      Außerdem gibt es für unsere Neueinsteiger ein hervorragendes PHP Tutorial zu PHP 4 und PHP 5 (OOP)
      Es heißt $array['index'] und nicht $array[index]! Und nein, das ist nicht egal!
      Dieses Thema lesen, um Ärger im Forum und verzögerte Hilfen zu vermeiden.

      Kommentar


      • #4
        Original geschrieben von Shurakai
        Ab Mittwoch gibts ja auch das neue Zend Studio 4 mit integriertem Dokumentator, falls du da ne Lizenz hast...

        *darauf freu*
        Habs leider nicht

        Im Release Candidate 3 von phpDocumentor scheint es ein Bugfix zu geben was denke ich mein Problem darstellt......

        Jedoch kann ich das Pear Paket auf meiner Linux Kiste nicht installieren da selbst der Root User nicht ins /tmp schreiben bzw. lesen kann

        root@Wishmaster:/tmp# dir
        phpdocumentor-1.3.0rc3.tar.gz
        root@Wishmaster:/tmp# pear install phpdocumentor-1.3.0rc3.tar.gz
        Unable to open /tmp/pearz1qRtg/package.xml

        User Warning: Could not open dir /tmp/pearz1qRtg in System.php on line 87
        root@Wishmaster:/tmp#
        Zuletzt geändert von Payne_of_Death; 19.02.2005, 20:01.
        [color=blue]MfG Payne_of_Death[/color]

        [color=red]Manual(s):[/color] <-| PHP | MySQL | SELFHTML |->
        [color=red]Merke:[/color]
        [color=blue]Du brauchst das Rad nicht neu erfinden ! [/color]<-ForumSuche rettet Leben-> || <-Schau in den Codeschnippsels->

        Murphy`s Importanst LAWS
        Jede Lösung bringt nur neue Probleme
        Das Fluchen ist die einzige Sprache, die jeder Programmierer beherrscht.
        In jedem kleinen Problem steckt ein großes, das gern raus moechte.

        Kommentar

        Lädt...
        X