Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Import CVS Head from cvs.phpdoc.org so that pear QA can easily help o…

…ut with the next release

git-svn-id: http://svn.php.net/repository/pear/packages/PhpDocumentor/trunk@198622 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
commit 7840640e50febe39cd92aac59dc456f38301e13b 1 parent 622e021
Joshua Eichorn authored
View
21 Authors
@@ -0,0 +1,21 @@
+$Id$
+
+
+Joshua Eichorn <jeichorn@phpdoc.org>
+Kellin <passionplay@hotmail.com>
+Juan Pablo Morales <ju-moral@uniandes.edu.co>
+Florian Clever <fclever@verinform.com>
+Dennis Kehrig <TheGeek@web.de>
+Greg Beaver <cellog@users.sourceforge.net>
+Robert Hoffmann <half-dead@users.sourceforge.net>
+Roberto Berto <darkelder@users.sourceforge.net>
+Dave Viner <dviner@yahoo-inc.com>
+Walter A Boring IV <hemna@users.sourceforge.net>
+Mark van Reunswolde <support@esdsoftware.net>
+Julien Damon <julien.damon@free.fr>
+Harald Fielker <fielker@informatik.fh-augsburg.de>
+Marco von Ballmoos <mvonballmo@users.sourceforge.net>
+Andrew Eddie <eddieajau@users.sourceforge.net>
+William K. Hardeman <william_hardeman@hands-solutions.com>
+
+# vim: set expandtab:
View
1,965 ChangeLog
1,965 additions, 0 deletions not shown
View
176 FAQ
@@ -0,0 +1,176 @@
+################################################################################
+ phpDocumentor Frequently Asked Questions
+
+################################################################################
+Introduction
+################################################################################
+
+Before we start with questions and their answers, make sure to read the
+documentation *thoroughly* found at http://www.phpdoc.org/manual.php. The
+complexity of phpDocumentor can be a bit impenetrable until you understand the
+logic behind it.
+
+If you have read the documentation thoroughly, and have read this FAQ and you
+are still lost, please go directly to the bug database at
+http://sourceforge.net/tracker/?group_id=11194&atid=111194 and read through the
+open bugs. If you don't find the solution to your problem (or proof that it
+at least is not your fault), then go to the help forum and post a help message
+at http://sourceforge.net/forum/forum.php?forum_id=35065.
+
+################################################################################
+All Questions (Table of Contents)
+################################################################################
+Installation
+ Q: [UNIX ONLY] When I run phpdoc from outside its directory, it doesn't work!
+ Q: [PEAR ONLY] I ran pear install PhpDocumentor, but running 'phpdoc' doesn't
+ work!
+Documentation Errors
+ Q: I keep getting an illegal package tag error for the first DocBlock in a file,
+ isn't this a page-level DocBlock?
+ Q: I keep getting a warning that there is no @package tag in file xxx.php, but
+ there is a @package tag in the class definition, doesn't this apply to the
+ file?
+Feature Requests
+ Q: Can you implement the @example tag inline so that I can put PHP source code
+ examples directly in DocBlocks?
+Crash/Segfaults
+ Q: phpDocumentor crashes if I use __FUNCTION__!!!
+
+################################################################################
+Installation
+################################################################################
+
+All old FAQ's for installation have been fixed in version 1.2.2, please open a
+bug if you continue to have these problems
+
+################################################################################
+Documentation Errors
+################################################################################
+
+Q: I keep getting an illegal package tag error for the first DocBlock in a file,
+ isn't this a page-level DocBlock?
+
+---
+---[[UPDATE]]
+---VERSION 1.2.2 has a different page-level docblock recognition algorithm
+---Now, the first docblock in a file is a page-level docblock if it contains
+---a @package tag.
+---
+A: Please read the documentation very carefully. A page-level DocBlock does
+ occur at the start of a file, but the first DocBlock is not always a
+ page-level DocBlock! Why is this? Very often, you will want to document
+ the entire page, or describe it (this page contains functions for blah), and
+ also document the first item in a page separately. An example:
+
+ <?php
+ /**
+ * This file contains all foobar functions and defines
+ * @package mypackage
+ */
+ /**
+ * controls parsing of bar information
+ */
+ define('parse_bar',true);
+ ?>
+
+ The page has its own information, and the define has its own information.
+ An example of what not to do:
+
+ <?php
+ /**
+ * This file contains all foobar functions and defines
+ * @package mypackage
+ */
+ define('parse_bar',true);
+ ?>
+
+ Here, the DocBlock belongs to the define and not to the page! phpDocumentor
+ can successfully parse this DocBlock, but it will apply the comment to the
+ documentation of define('parse_bar',true); and not to the page. Therefore,
+ it warns you that your @package tag will be ignored because defines may not
+ contain a @package tag.
+
+Q: I keep getting a warning that there is no @package tag in file xxx.php, but
+ there is a @package tag in the class definition, doesn't this apply to the
+ file?
+
+A: No. this example does not have a page-level DocBlock:
+
+ <?php
+ /**
+ * This class is in package mypackage
+ * @package mypackage
+ */
+ class in_mypackage {...}
+ ?>
+
+ phpDocumentor therefore assumes the page-level package is the same as the
+ class package, mypackage. This is fine in most cases, but if multiple
+ classes are in the same file with different packages, as in:
+
+ <?php
+ /**
+ * This class is in package mypackage
+ * @package mypackage
+ */
+ class in_mypackage {...}
+ /**
+ * This class is in package anotherpackage
+ * @package anotherpackage
+ */
+ class in_anotherpackage {...}
+ ?>
+
+ There is no way to determine which package the page should belong to, and
+ phpDocumentor will automatically put it in the default package. This can
+ cause incredible headaches debugging, and so we have added a warning in the
+ 1.2.0 series that informs you if the package is inferred by phpDocumentor.
+ To fix this warning, simply place a page-level DocBlock with a @package tag
+ like:
+
+ <?php
+ /**
+ * This file contains two packages
+ * @package filepackage
+ */
+ /**
+ * This class is in package mypackage
+ * @package mypackage
+ */
+ class in_mypackage {...}
+ /**
+ * This class is in package anotherpackage
+ * @package anotherpackage
+ */
+ class in_anotherpackage {...}
+ ?>
+################################################################################
+Feature Requests
+################################################################################
+Q: Can you implement the @example tag inline so that I can put PHP source code
+ examples directly in DocBlocks?
+
+A: This is implemented using the HTML <code></code> tags as in:
+
+ /**
+ * Short description
+ *
+ * Start of long description, here is a code example:
+ * <code>
+ * $my_phpcode = "easy to explain";
+ * </code>
+ * More text
+ * <code>
+ * define('morecode',true);
+ * </code>
+ */
+################################################################################
+Crash/Segfaults
+################################################################################
+Q: phpDocumentor crashes if I use __FUNCTION__!!!
+
+A: This is caused by a known bug in all PHP versions prior to 4.3.2. It was
+ fixed in PHP 4.3.2RC1, you must upgrade to PHP 4.3.2 if you use __FUNCTION__
+ in code that you wish to document (sorry!) or apply the bugfix patch to the
+ tokenizer extension and recompile php (see the php.internals archive at
+ php.net for help)
View
87 INSTALL
@@ -0,0 +1,87 @@
+$Id$
+
+phpDocumentor Installation instructions
+---------------------------------------
+
+phpDocumentor is very easy to install. The hardest part is installing PHP
+and possibly a Web Server, if you plan to use the web interface phpdoc.php
+
+To install phpDocumentor, use a compression program to decompress the
+contents to a directory, preserving internal directory structure of the
+archive. If you wish to use the web interface, you must unzip the
+archive into a subdirectory accessible by the web server.
+
+NOTE:
+There have been problems with the non GNU tar not being able to extracts some
+of the long directory paths properly. The simplest solution for BSD users is
+to download the zip version of phpDocumentor.
+
+PEAR installation
+-----------------
+This is by far the easiest way to install phpDocumentor. Included in this
+release is a package.xml file.
+
+If you plan to use the web interface, you must run this command prior to installation:
+
+pear config-set data_dir /path/to/public_html/pear
+
+The line above assumes that /path/to/public_html is the location of index.html if you browse
+to http://localhost/index.html
+
+Simply run
+
+pear install /path/to/phpDocumentor-1.3.0/package.xml
+
+on Windows:
+
+pear install C:\path\to\phpDocumentor-1.3.0\package.xml
+
+If you have an existing install, pear uninstall PhpDocumentor first.
+
+To use the web interface, browse to http://localhost/pear/PhpDocumentor/index.html
+
+The cli interface is installed in the pear bin_dir, you can find this directory by running:
+pear config-show
+
+Command-line interface installation and usage instructions
+----------------------------------------------------------
+To use phpDocumentor as a command-line interface, you need to install PHP
+version 4.1.0 or greater.
+
+*IMPORTANT* any version of PHP below 4.1.0 will not work with version 1.3.0 of
+phpDocumentor!!! To use the advanced tokenizer-based parser, you must have php 4.3.0
+
+Windows
+-------
+You need the cli version of PHP (php-cli.exe or cli/php.exe in 4.3.0+).
+Either run phpDocumentor from the directory that PHP resides in, or put
+php.exe in your DOS PATH enviroment variable. The simplest usage of phpDocumentor is:
+
+C:\>php.exe "C:\Path\To\phpdoc" -t targetdir -o HTML:default:default -d parsedir
+
+where targetdir is the directory you wish phpDocumentor to create output,
+and parsedir is the directory you wish to parse.
+
+Unix
+----
+Make sure that the cgi/cli version of PHP is in your path. The simplest usage
+of phpDocumentor is:
+
+phpdoc -t targetdir -o HTML:default:default -d parsedir
+
+You can use makedoc.sh. Simple copy it to your project path and edit it.
+When you wish to (re)build your project's documentation, simple run it.
+
+
+Web interface installation and usage instructions
+-------------------------------------------------
+To use phpDocumentor as a web interface, you need to install a Web server
+and configure it, as well as install PHP version 4.1.0 or greater. Consult
+the documentation of your webserver and of PHP for installation support.
+
+Windows and Unix
+----------------
+open a web browser and browse to phpdoc.php at the location that you set up.
+Instructions are in the web interface.
+
+vim: set expandtab :
View
69 LICENSE
@@ -0,0 +1,69 @@
+--------------------------------------------------------------------
+ The PHP License, version 3.0
+Copyright (c) 1999 - 2002 The PHP Group. All rights reserved.
+--------------------------------------------------------------------
+
+Redistribution and use in source and binary forms, with or without
+modification, is 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 "PHP" must not be used to endorse or promote products
+ derived from this software without prior written permission. For
+ written permission, please contact group@php.net.
+
+ 4. Products derived from this software may not be called "PHP", nor
+ may "PHP" appear in their name, without prior written permission
+ from group@php.net. You may indicate that your software works in
+ conjunction with PHP by saying "Foo for PHP" instead of calling
+ it "PHP Foo" or "phpfoo"
+
+ 5. The PHP Group may publish revised and/or new versions of the
+ license from time to time. Each version will be given a
+ distinguishing version number.
+ Once covered code has been published under a particular version
+ of the license, you may always continue to use it under the terms
+ of that version. You may also choose to use such covered code
+ under the terms of any subsequent version of the license
+ published by the PHP Group. No one other than the PHP Group has
+ the right to modify the terms applicable to covered code created
+ under this License.
+
+ 6. Redistributions of any form whatsoever must retain the following
+ acknowledgment:
+ "This product includes PHP, freely available from
+ <http://www.php.net/>".
+
+THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND
+ANY EXPRESSED 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 PHP
+DEVELOPMENT TEAM OR ITS CONTRIBUTORS 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.
+
+--------------------------------------------------------------------
+
+This software consists of voluntary contributions made by many
+individuals on behalf of the PHP Group.
+
+The PHP Group can be contacted via Email at group@php.net.
+
+For more information on the PHP Group and the PHP project,
+please see <http://www.php.net>.
+
+This product includes the Zend Engine, freely available at
+<http://www.zend.com>.
+
View
69 PHPLICENSE.txt
@@ -0,0 +1,69 @@
+--------------------------------------------------------------------
+ The PHP License, version 3.0
+Copyright (c) 1999 - 2002 The PHP Group. All rights reserved.
+--------------------------------------------------------------------
+
+Redistribution and use in source and binary forms, with or without
+modification, is 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 "PHP" must not be used to endorse or promote products
+ derived from this software without prior written permission. For
+ written permission, please contact group@php.net.
+
+ 4. Products derived from this software may not be called "PHP", nor
+ may "PHP" appear in their name, without prior written permission
+ from group@php.net. You may indicate that your software works in
+ conjunction with PHP by saying "Foo for PHP" instead of calling
+ it "PHP Foo" or "phpfoo"
+
+ 5. The PHP Group may publish revised and/or new versions of the
+ license from time to time. Each version will be given a
+ distinguishing version number.
+ Once covered code has been published under a particular version
+ of the license, you may always continue to use it under the terms
+ of that version. You may also choose to use such covered code
+ under the terms of any subsequent version of the license
+ published by the PHP Group. No one other than the PHP Group has
+ the right to modify the terms applicable to covered code created
+ under this License.
+
+ 6. Redistributions of any form whatsoever must retain the following
+ acknowledgment:
+ "This product includes PHP, freely available from
+ <http://www.php.net/>".
+
+THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND
+ANY EXPRESSED 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 PHP
+DEVELOPMENT TEAM OR ITS CONTRIBUTORS 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.
+
+--------------------------------------------------------------------
+
+This software consists of voluntary contributions made by many
+individuals on behalf of the PHP Group.
+
+The PHP Group can be contacted via Email at group@php.net.
+
+For more information on the PHP Group and the PHP project,
+please see <http://www.php.net>.
+
+This product includes the Zend Engine, freely available at
+<http://www.zend.com>.
+
View
196 README
@@ -1,11 +1,193 @@
-To access phpDocumentor CVS, please see http://www.phpdoc.org for up-to-date
-anonymous CVS instructions
+$Id$
-Development versions of phpDocumentor (aka cvs) can be access either through the nightly builds available at http://developer.phpdoc.org/downloads/ or by using anonymous cvs.
+################################################################################
+ phpDocumentor
-Anonymous cvs instructions
+################################################################################
+Installation
+################################################################################
-cvs -d :pserver:anonymous@phpdoc.org:/opt/cvsroot login
-cvs -d :pserver:anonymous@phpdoc.org:/opt/cvsroot co phpdoc
+Installation for phpDocumentor is as simple as installing PHP and a web server.
+If you need help installing a webserver or php, refer to the documentation that
+comes with the webserver or with php.
-email Josh Eichorn, jeichorn@phpdoc.org, if you have any problems
+All users with PEAR should either install this version directly from the package.xml
+file included in the distribution, or install via pear install PhpDocumentor. The
+command-line interface "phpdoc" will be in the path, you can use it immediately
+on both windows and unix. The web interface will be in a subdirectory of your
+document root, as soon as PEAR releases a version with support for the role="publicweb"
+attribute. Be sure to "pear config-set publicweb_dir /path/to/my/htdocs"
+
+To use phpDocumentor as a command-line
+tool in *nix-based systems, simply run the phpdoc script. In windows, run
+"c:\php\php.exe phpdoc" where C:\php is the path to the cgi version of php.
+The phpdoc command-line interface will not run with the ISAPI module of PHP.
+To see the command line options, use phpdoc -h or read at the bottom of this
+README.
+
+There is a BASH shell script that you can put inside your project that can save
+time writing command-line options of phpdoc. Simply copy makedoc.sh to your
+project path and edit it. When you wish to rebuild the documentation, run it again.
+
+To use phpDocumentor's web interface, install the files into a subdirectory of
+your document root (read the webserver's documentation for more information if you
+don't understand how to install into a subdirectory of your document root).
+Then, browse to the web page as you would to any other web page. If you encounter
+problems, make sure that the web server has write access permissions to the output
+directory that you choose. Again, your web server documentation has detailed
+information on how to do this. The command-line interface will not have problems
+with access.
+
+If you need more detailed help, check out INSTALL
+
+################################################################################
+Release Notes
+################################################################################
+
+Release notes for the newest version are in Release-1.3.0
+
+1.3.0 is out, a STABLE release
+
+To learn howto write PHPDoc-style documentation run phpDocumentor on itself, with
+./phpdoc -c makedocs. Before you do, modify users/makedocs.ini to contain the
+proper path values
+
+If you find a bug please post it at:
+http://sourceforge.net/tracker/?func=add&group_id=11194&atid=111194
+
+################################################################################
+General Notes
+################################################################################
+phpDocumentor is hosted at phpdoc.org, with downloads and mailing list through
+sourceforge.net
+
+webpage: http://phpdoc.org/
+documentation: http://phpdoc.org/manual.php
+mirror: http://phpdocu.sourceforge.net
+projectpage: http://sourceforge.net/projects/phpdocu
+
+For a list of people who have helped work on this project please read the
+Authors file
+
+phpDocumentor 1.3.0 is released under the PHP License version 3.0, text is in
+PHPLICENSE.txt
+
+################################################################################
+Feature Notes
+################################################################################
+
+phpDocumentor is a JavaDoc-like automatic documentation generator for PHP
+written in PHP. It is the most versatile tool for documenting PHP.
+
+For users new to phpDocumentor, phpDocumentor uses an event-driven parser
+and intermediary data structures that allow it to perform at a level other
+automatic documentors for PHP cannot achieve:
+ --parsing any php file, with multiple classes and functions in the same file
+ --fully compliant with even the most esoteric php syntax
+ ($string = <<< EOF, for example)
+ --ability to generate multiple output formats
+ --extremely fast parsing
+ --error/warnings by line number and file to allow for debugging of
+ documentation tags
+ --multiple output templates to easily customize the look of generated
+ documentation
+ --extensive documentation of the package, including a detailed specification
+ for tags and templates
+ --PHP License
+
+New in version 1.3.0:
+ --PHP 5 Parsing
+ --bugfixes of version 1.2.3
+
+If something is missing from this list make sure sure to file
+a feature request on sourceforge
+
+http://sourceforge.net/tracker/?func=add&group_id=11194&atid=361194
+
+If you want to help code that new feature and get it just right, please let us know.
+Any help is greatly appreciated, just contact the
+phpDocumentor team for information on getting started.
+
+phpDocumentor needs php 4.1.0 or greater, but you'll see the best performance
+in the newest version. The recommended version for 1.3.0 is 4.3.4+.
+Performance is at least 30-50% faster with PHP 4.3.4, and a heredoc bug is fixed
+in the tokenizer
+
+################################################################################
+Command Line notes
+################################################################################
+
+Read the documentation at http://www.phpdoc.org/docs for the most up-to-date
+command-line information.
+
+You can also generate documentation from the source using:
+
+phpdoc -c makedocs
+
+run this command from the installation directory, and make sure you have full
+write and directory creation permissions or it will not work
+
+Generated documentation is accessible via Documentation/new/index.html
+
+################################################################################
+
+if you run phpdoc and get :
+bash: ./phpdoc: No such file or directory
+
+Then you haven't installed the cgi version of php
+goto your php src dir and try
+make clean
+./configure
+make
+make install
+
+phpdoc should work now
+
+If your using php 4.2.0 or higher you will want to use the cli version
+instead of the cgi. Checkout php.net for details on these changes
+
+
+################################################################################
+Web Interface notes
+################################################################################
+Put phpdoc.php together with the *.inc files someplace on your webserver.
+NEVER USE THE WEB INTERFACE ON A PRODUCTION WEBSERVER. Allowing your server
+to write files to disk is a serious security risk, and phpDocumentor is not
+designed to work on insecure systems. Setup php on a development machine
+that has a firewall or no internet connection, and run phpDocumentor from there.
+
+Make sure you webserver can write to where ever you specify as a target or you
+will get lots of errors
+
+################################################################################
+Thanks
+################################################################################
+Thanks to Sam Blum for his assistance with @example and other enhancements
+Thanks to William K. Hardeman for his HTML:Smarty:HandS design
+Thanks to Marco von Ballmoos for transforming the HTML:frames converter and
+ templates into a magnificent work of art
+Thanks to Andrew Eddie for docbuilder and the CHM Converter enhancements
+Thanks to Darren Cook for suggesting exciting new features, and making sure that
+ they worked when implemented
+Thanks to Marko Kaening, Dan Convissor for policing the source and finding bugs
+ that would have otherwise gone undetected
+Thanks to Juan Pablo Morales for the web interface.
+Thanks to whoever sent me the patch to make phpdocumentor work better in NT
+ I have your diff and patched the program but i seem to have lost your
+ name if you send it to me i'll add it to the Authors file
+Thanks to Florian Clever for the newest set of win32 patches they seem to have
+ fixed the last of the problems.
+
+ Thanks to EVERYONE who has provided ideas and input, without you,
+ phpDocumentor would be nothing
+
+################################################################################
+################################################################################
+if you have any questions please email
+joshua eichorn jeichorn@phpdoc.org
+gregory beaver cellog@users.sourceforge.net
+
+
+
+
+vim: set expandtab:
View
114 Release-1.3.0
@@ -0,0 +1,114 @@
+$Id$
+
+PhpDocumentor Version 1.3.0
+################################################################################
+http://www.phpdoc.org
+Joshua Eichorn jeichorn@phpdoc.org
+Gregory Beaver cellog@users.sourceforge.net
+################################################################################
+################################################################################
+
+The phpDocumentor team would like to announce the release of phpDocumentor
+1.3.0. This release adds in PHP 5 support, highlighting of tutorial XML,
+beautifying of output from the XML:DocBook/peardoc2:default converter,
+and fixes a few bugs found in 1.2.3.1. In addition, output from source highlighting
+is much more efficient, resulting in slightly smaller file size for sourcecode=on.
+Also, multi-national characters are now allowed in a package name - at your own risk.
+I found that Apache 1.3 could not serve files with multi-national characters, but
+when loaded directly from disk, web browsers did just fine.
+
+------
+IMPORTANT: phpDocumentor 1.3.0 requires PHP version 4.2.0 or greater.
+phpDocumentor will function best with PHP version 4.3.0 or greater, as it will
+use of the tokenizer extension if php 4.3.0 is installed for a tremendous
+increase in parsing speed.
+------
+WARNING: The PDF Converter will not work in PHP5. The PDF library that it relies upon
+segfaults with the simplest of files. Generation still works great in PHP4
+------
+
+Speaking of speed, do NOT run the PDF Converter with --sourcecode = on for any
+medium to large sized projects. I had to kill a PDF generation after 36 hours
+on a Pentium IV 2.66GHz computer - 36 hours! The design of the PDF generation
+library is tremendously inefficient, probably on the order of O(n^2). I'd fix
+this if I knew anything about PDF. If there are any users out there with the
+time and expertise to look into the algorithms used by CPdf, we would all
+appreciate it.
+
+This version removes the unmaintained and not very useful dia2codeConverter
+
+A full listing of all closed bugs and feature requests can be found in the
+next section of the notes
+
+phpDocumentor 1.3.0 is ready for production use documenting any PHP project,
+download it and try the most advanced solution for PHP documentation
+today.
+
+################################################################################
+
+The following bugs are fixed in version 1.3.0
+ [ 834941 ] inline @link doesn't work within <b>
+ [ 839092 ] CHM:default:default produces bad links
+ [ 839466 ] {$array['Key']} in heredoc
+ [ 840792 ] File Missing XML:DocBook/peardoc2:default "errors.tpl"
+ [ 850731 ] No DocBlock template after page-level DocBlock?
+ [ 850767 ] MHW Reference wrong
+ [ 854321 ] web interface errors with template directory
+ [ 856310 ] HTML:frames:DOM/earthli missing Class_logo.png image
+ [ 865126 ] CHM files use hard paths
+ [ 869803 ] bad md5sum
+ [ 871764 ] @global doesn't work properly with whitespace after the $var
+ [ 875525 ] <li> escapes <pre> and ignores paragraphs
+ [ 876674 ] first line of pre and code gets left trimmed
+ [ 877229 ] PHP 5 incompatibilities bork tutorial parsing
+ [ 877233 ] PHP 5 incompatibilities bork docblock source highlighting
+ [ 878911 ] [PHP 5 incompatibility] argv
+ [ 879068 ] var arrays tripped up by comments
+ [ 879151 ] HTML:frames:earthli Top row too small for IE
+ [ 880070 ] PHP5 visability for member variables not working
+ [ 880488 ] '0' file stops processing
+ [ 884863 ] Multiple authors get added in wrong order.
+ [ 884869 ] Wrong highligthing of object type variables
+ [ 892305 ] peardoc2: summary require_once Path/File.php is PathFile.php
+ [ 892306 ] peardoc2: @see of method not working
+ [ 892479 ] {@link} in // comment is escaped
+ [ 893470 ] __clone called directly in PackagePageElements.inc
+ [ 895656 ] initialized private variables not recognized as private
+ [ 904823 ] IntermediateParser fatal error
+ [ 910676 ] Fatal error: Smarty error: unable to write to $compile_dir
+ [ 915770 ] Classes in file not showing
+ [ 924313 ] Objec access on array
+
+There of course were other small bugs fixed, these were just the bugs with
+entries in source forge. You can view the bug details or reopen it if
+you think it's not totally fixed at:
+http://sourceforge.net/tracker/?group_id=11194&atid=111194
+
+Features added that had Feature Request entries in SF for 1.3.0:
+ [ 727084 ] Support for custom files to include (README etc).
+ [ 749279 ] inline {@example} tag
+ [ 799026 ] Images in tutorials
+ [ 799232 ] Change behavior of -c key to use any configuration file.
+ [ 856770 ] PHP 5 support
+
+################################################################################
+
+The documentation has been updated for this release you can view it at
+http://www.phpdoc.org/docs
+or in the distribution in the spec directory
+
+The changelog is available in the tarball, or online at
+http://phpdocu.sourceforge.net/Changelog
+
+You can download the newest version from
+http://phpdocu.sourceforge.net/downloads.php
+
+And of course you can reach the webpage at http://phpdocu.sourceforge.net/ or
+http://phpdoc.org/
+
+enjoy
+-joshua eichorn <jeichorn@phpdoc.org>
+-gregory beaver <cellog@users.sourceforge.net>
+
+
+vim: set expandtab :
View
17 index.html
@@ -0,0 +1,17 @@
+<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>docBuilder - phpDocumentor web interface</title>
+<meta name="Generator" content="EditPlus">
+<meta name="Author" content="Andrew Eddie">
+<meta name="Description" content="Frameset for phpDocumentor docBuilder web interface">
+</head>
+
+<frameset rows="35,*,40,135">
+ <frame src="docbuilder/top.php" frameborder="no">
+ <frame src="docbuilder/config.php" name="DataFrame" frameborder="no">
+ <frame src="docbuilder/actions.php" name="ActionFrame" scrolling="no" marginwidth="0" marginheight="0" frameborder="no">
+ <frame src="docbuilder/blank.html" name="OutputFrame" marginwidth="0" marginheight="0" frameborder="yes">
+</frameset>
+
+</html>
View
662 new_phpdoc.php
@@ -0,0 +1,662 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<?php
+/**
+ * Advanced Web Interface to phpDocumentor
+ * @see phpdoc.php
+ * @package phpDocumentor
+ * @deprecated in favor of docbuilder (see {@link docbuilder/config.php})
+ * @filesource
+ */
+//
+//
+// An HTML interface for Joshua Eichorn's phpDocumentor
+// Author: Juan Pablo Morales <ju-moral@uniandes.edu.co>
+// Joshua Eichorn <jeichorn@phpdoc.org>
+// Gregory Beaver <cellog@users.sourceforge.net>
+//
+// phpDocumentor, a program for creating javadoc style documentation from php code
+// Copyright (C) 2000-2002 Joshua Eichorn
+//
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+//
+// Copyleft 2001 Juan Pablo Morales
+
+if (!function_exists('version_compare'))
+{
+ print "phpDocumentor requires PHP version 4.1.0 or greater to function";
+ exit;
+}
+
+// set up include path so we can find all files, no matter what
+$GLOBALS['_phpDocumentor_install_dir'] = dirname(realpath(__FILE__));
+// add my directory to the include path, and make it first, should fix any errors
+if (substr(PHP_OS, 0, 3) == 'WIN')
+ini_set('include_path',$GLOBALS['_phpDocumentor_install_dir'].';'.ini_get('include_path'));
+else
+ini_set('include_path',$GLOBALS['_phpDocumentor_install_dir'].':'.ini_get('include_path'));
+
+/**
+* common file information
+*/
+include_once("phpDocumentor/common.inc.php");
+
+// find the .ini directory by parsing phpDocumentor.ini and extracting _phpDocumentor_options[userdir]
+$ini = phpDocumentor_parse_ini_file($_phpDocumentor_install_dir . PATH_DELIMITER . 'phpDocumentor.ini', true);
+if (isset($ini['_phpDocumentor_options']['userdir']))
+ $configdir = $ini['_phpDocumentor_options']['userdir'];
+else
+ $configdir = $_phpDocumentor_install_dir . '/user';
+
+// allow the user to change this at runtime
+if (!empty($_REQUEST['altuserdir'])) $configdir = $_REQUEST['altuserdir'];
+?>
+<html>
+ <head>
+ <title>
+ Form to submit to phpDocumentor v<?php print PHPDOCUMENTOR_VER; ?>
+ </title>
+ <?php
+ if(!isset($_GET['submit']) || !empty($_REQUEST['altuserdir'])) {
+?>
+<script src="HTML_TreeMenu-1.1.2/TreeMenu.js" language="JavaScript" type="text/javascript"></script>
+ <?php
+ include_once('HTML_TreeMenu-1.1.2/TreeMenu.php');
+ set_time_limit(0); // six minute timeout
+ ini_set("memory_limit","256M");
+ /**
+ * Directory Node
+ * @package HTML_TreeMenu
+ */
+ class DirNode extends HTML_TreeNode
+ {
+ /**
+ * full path to this node
+ * @var string
+ */
+ var $path;
+
+ function DirNode($text = false, $link = false, $icon = false, $path, $events = array())
+ {
+ $this->path = $path;
+ $options = array();
+ if ($text) $options['text'] = $text;
+ if ($link) $options['link'] = $link;
+ if ($icon) $options['icon'] = $icon;
+ HTML_TreeNode::HTML_TreeNode($options,$events);
+ }
+ }
+
+ function getDir($path,&$node)
+ {
+ global $pd;
+ if (!$dir = opendir($path)) return;
+
+ $node = new HTML_TreeNode(array('text' => basename(realpath($path)), 'link' => "", 'icon' => 'folder.gif'));
+ while (($file = readdir($dir)) !== false)
+ {
+ if ($file != '.' && $file != '..')
+ {
+ if (is_dir("$path$pd$file") && !is_link("$path$pd$file"))
+ {
+ $entry[] = "$path$pd$file";
+ }
+ }
+ }
+ closedir($dir);
+ for($i = 0; $i < count($entry); $i++)
+ {
+ $node->addItem(new HTML_TreeNode(array('text'=>basename(realpath($entry[$i])), 'link' => "javascript:setHelp('".addslashes(realpath($entry[$i]))."');", 'icon' => 'folder.gif')));
+ }
+ }
+
+ function recurseDir($path, &$node) {
+ global $pd;
+ if (!$dir = opendir($path)) {
+ return false;
+ }
+ $anode = new HTML_TreeNode(array('text' => basename($path), 'link' => "javascript:setHelpVal('".$path."');", 'icon' => 'folder.gif'));
+ $result = addslashes(realpath(stripslashes($path).$pd.".."));
+ if (!$node) $anode->addItem(new DirNode('..',"javascript:setHelp('".$result."');",'folder.gif'),'..');
+ while (($file = readdir($dir)) !== false) {
+ if ($file != '.' && $file != '..') {
+ if (is_dir("$path$pd$file")) {
+ recurseDir("$path$pd$file",$anode);
+ }
+ }
+ }
+ rewinddir($dir);//
+ while (false){//($file = readdir($dir)) !== false) {
+ if ($file != '.' && $file != '..') {
+ if (is_file("$path$pd$file")) {
+ $anode->addItem(new DirNode($file,"javascript:setHelpVal('$path$pd$file');",'branchtop.gif',"$path$pd$file"));
+ }
+ }
+ }
+ if (!$node) $node = $anode;
+ else
+ $node->addItem($anode);
+ closedir($dir);
+ }
+
+ function switchDirTree($path, &$node)
+ {
+ global $pd;
+
+ // initialize recursion simulation values
+ // array format: path => &parent in $node itemlist
+ $parent = array();
+ $parent_indexes = array();
+ $parenti = 1;
+
+ $node = new DirNode(basename($path),"javascript:setHelpVal('".$path."');",'folder.gif',$path);
+ $result = addslashes(realpath($path.$pd.".."));
+ $node->addItem(new DirNode('..',"javascript:setHelp('".$result."');",'folder.gif','..'));
+ $rnode = &$node;
+ $parent[realpath($path)] = false;
+ $recur = 0;
+ do
+ {
+ if ($recur++ > 120) return;
+ if (!$dir = @opendir($path)) {
+ // no child files or directories
+// echo "$path no child files or directories return to ";
+ $rnode = &$parent[realpath($path)];
+ $path = $rnode->path;
+ if (isset($parent_indexes[realpath($path)])) $parenti = $parent_indexes[realpath($path)];
+// echo "$path parenti $parenti<br>";
+ }
+// fancy_debug($path,$parent_indexes);
+// vdump_par($parent);
+ if (!isset($parent_indexes[realpath($path)]))
+ {
+ $file = readdir($dir);
+ while ($file !== false) {
+ if ($file != '.' && $file != '..') {
+ if (@is_dir(realpath("$path$pd$file"))) {
+ if (!isset($parent_indexes[realpath($path)])) $parent_indexes[realpath($path)] = true;
+ $parent[realpath("$path$pd$file")] = &$rnode;
+// echo "<br>adding new ".addslashes(realpath($path.$pd.$file))." to $path<br>";
+ $rnode->addItem(new DirNode(addslashes(realpath("$path$pd$file")),"javascript:setHelpVal('".addslashes(realpath($path.$pd.$file))."');",'folder.gif',addslashes(realpath($path.$pd.$file))));
+ }
+ }
+ $file = readdir($dir);
+ }
+ }
+ // go down the tree if possible
+ if (isset($parent_indexes[realpath($path)]))
+ {
+ if ($parenti + 1 > (count($rnode->items)))
+ {
+ // no more children, go back up to parent
+// echo "$path no more children, go back up to parent ";
+ $rnode = &$parent[realpath($path)];
+ $path = $rnode->path;
+ if (isset($parent_indexes[realpath($path)])) $parenti = $parent_indexes[realpath($path)];
+// echo $path." parenti $parenti<br>";
+ } else
+ {
+ // go to next child
+// echo "$path go to next child ";
+ $parent_indexes[realpath($path)] = $parenti+1;
+// debug("set parent ".$rnode->items[$parenti]->path." = ".$rnode->path.'<br>');
+ $parent[realpath($rnode->items[$parenti]->path)] = &$rnode;
+ $rnode = &$rnode->items[$parenti];
+ $path = $rnode->path;
+// echo "$path<br>";
+ $parenti = 0;
+ }
+ } else
+ {
+ // no children, go back up the tree to the next child
+// echo "$path no children, go back up to parent ";
+ $rnode = &$parent[realpath($path)];
+ $path = $rnode->path;
+ if (isset($parent_indexes[realpath($path)])) $parenti = $parent_indexes[realpath($path)];
+// echo "$path parenti $parenti<br>";
+ }
+ @closedir($dir);
+ } while ($path && (($parenti < (count($rnode->items))) || ($parent[realpath($path)] !== false)));
+ }
+
+ function vdump_par($tree)
+ {
+ foreach($tree as $key => $val)
+ {
+ if ($val === false)
+ debug($key.' -> false<br>');
+ else
+ debug($key.' -> ' .$val->path.'<br>');
+ }
+ debug('<br>');
+ }
+
+ $menu = new HTML_TreeMenu();
+ $filename = '';
+ if (isset($_GET) && isset($_GET['fileName'])) $filename = $_GET['fileName'];
+ $filename = realpath($filename);
+ $pd = (substr(PHP_OS, 0, 3) == 'WIN') ? '\\' : '/';
+ $test = ($pd == '/') ? '/' : 'C:\\';
+ if (empty($filename) || ($filename == $test))
+ {
+ $filename = ($pd == '/') ? '/' : 'C:\\';
+ $node = false;
+ getDir($filename,$node);
+ } else
+ {
+ flush();
+// if ($pd != '/') $pd = $pd.$pd;
+ $anode = false;
+ switchDirTree($filename,$anode);
+// recurseDir($filename,$anode);
+ $node = new HTML_TreeNode(array('text' => "Click to view $filename",'link' => "",'icon' => 'branchtop.gif'));
+ $node->addItem($anode);
+ };
+ $menu->addItem($node);
+ $DHTMLmenu = &new HTML_TreeMenu_DHTML($menu, array('images' => 'HTML_TreeMenu-1.1.2/images'));
+ ?>
+<script type="text/javascript" language="Javascript">
+/**
+ Creates some global variables
+*/
+function initializate() {
+ //
+ //The "platform independent" newLine
+ //
+ //Taken from http://developer.netscape.com/docs/manuals/communicator/jsref/brow1.htm#1010426
+if (navigator.appVersion.lastIndexOf('Win') != -1)
+ {
+ $pathdelim="\\";
+ $newLine="\r\n";
+ } else
+ {
+ $newLine="\n";
+ $pathdelim="/";
+ }
+/* for($a=0;$a<document.dataForm.elements.length;$a++) {
+ alert("The name is '"+document.dataForm.elements[$a].name+"' "+$a);
+ }
+*/
+}
+/** Sets the contents of the help box, and submits the form
+*/
+function setHelp($str)
+{
+ document.helpForm.fileName.value = $str;
+ document.helpForm.helpdata.click();
+}
+
+/** Sets the contents of the help box only
+*/
+function setHelpVal($str)
+{
+ document.helpForm.fileName.value = $str;
+}
+/**Adds the contents of the help box as a directory
+*/
+function addDirectory($object) {
+ $a = document.helpForm.fileName.value;
+ $a = myReplace($a,'\\\\','\\');
+ if ($a[$a.length - 1] == $pathdelim) $a = $a.substring(0, $a.length - 1);
+ if ($a.lastIndexOf('.') > 0)
+ {
+ $a = $a.substring(0,$a.lastIndexOf($pathdelim));
+ }
+ $object.value = prepareString($object.value)+$a;
+}
+/**Adds the contents of the converter box to the converters list
+*/
+function addConverter($object) {
+ $object.value = prepareString($object.value)+document.dataForm.ConverterSetting.value;
+}
+/**Replaces the converters list with the contents of the converter box
+*/
+function replaceConverter($object) {
+ $object.value = document.dataForm.ConverterSetting.value;
+}
+/**Adds the contents of the help box as a file to the given control
+*/
+function addFile($object) {
+ $a = document.helpForm.fileName.value;
+ $a = myReplace($a,'\\\\','\\');
+ $object.value = prepareString($object.value)+$a;
+}
+/**Takes a given string and leaves it ready to add a new string
+ That is, puts the comma and the new line if needed
+*/
+function prepareString($myString) {
+ //First verify that a comma is not at the end
+ if($myString.lastIndexOf(",") >= $myString.length-2) {
+ //We have a comma at the end
+ return $myString;
+ }
+ if($myString.length > 0) {
+ $myString+=","+$newLine;
+ }
+ return $myString;
+}
+/**Do the validation needed before sending the from and return a truth value indicating if the form can be sent
+*/
+ function validate() {
+ //Take out all newLines and change them by nothing
+ //This could be done by using javascript function's replacebut that was implemented only until Navigator 4.0 and so it is better to use more backward compatible functions like substr
+ document.dataForm.elements[0].value= stripNewLines(document.dataForm.elements[0].value);
+ document.dataForm.elements[1].value= stripNewLines(document.dataForm.elements[1].value);
+ document.dataForm.elements[2].value= stripNewLines(document.dataForm.elements[2].value);
+ document.dataForm.elements[3].value= stripNewLines(document.dataForm.elements[3].value);
+ document.dataForm.elements[4].value= stripNewLines(document.dataForm.elements[4].value);
+ document.dataForm.elements[5].value= stripNewLines(document.dataForm.elements[5].value);
+ document.dataForm.elements[6].value= stripNewLines(document.dataForm.elements[6].value);
+ document.dataForm.elements[7].value= stripNewLines(document.dataForm.elements[7].value);
+ //By returning true we are allowing the form to be submitted
+ return true;
+ }
+/**Takes a string and removes all the ocurrences of new lines
+Could have been implemented a lot easier with replace but it's not very backwards compatible
+*/
+ function stripNewLines($myString) {
+ return myReplace($myString,$newLine,'');
+ }
+ function myReplace($string,$text,$by) {
+ // Replaces text with by in string
+ var $strLength = $string.length, $txtLength = $text.length;
+ if (($strLength == 0) || ($txtLength == 0)) return $string;
+
+ var $i = $string.indexOf($text);
+ if ((!$i) && ($text != $string.substring(0,$txtLength))) return $string;
+ if ($i == -1) return $string;
+
+ var $newstr = $string.substring(0,$i) + $by;
+
+ if ($i+$txtLength < $strLength)
+ $newstr += myReplace($string.substring($i+$txtLength,$strLength),$text,$by);
+
+ return $newstr;
+ }
+</script><?php } ?>
+ </head>
+ <?php
+ //Find out if we are submitting and if we are, send it
+ // This code originally by Joshua Eichorn on phpdoc.php
+ //
+ if(isset($_GET['submit']) && empty($_REQUEST['altuserdir'])) {
+ echo "<body bgcolor=\"#ffffff\">";
+ echo "<h1>Parsing Files ...</h1>";
+ flush();
+ echo "<pre>\n";
+ /** phpdoc.inc */
+ include("phpDocumentor/phpdoc.inc");
+ echo "</pre>\n";
+ echo "<h1>Operation Completed!!</h1>";
+ } else
+ {
+ ?>
+ <body bgcolor="#ffffff" onload="javascript:initializate()">
+ <h1>
+ phpDocumentor v<?php print PHPDOCUMENTOR_VER; ?> Web Interface
+ </h1>
+ phpDocumentor written by Joshua Eichorn<br>
+ Web Interface written by Juan Pablo Morales and enhanced by Greg Beaver<br>
+ <img src="poweredbyphpdoc.gif" alt="" width="88" height="31" border="0">
+ <table cellpadding="1" cellspacing="1" border="0" width="60%" bgcolor=
+ "#000000">
+ <tr>
+ <td bgcolor="#ffff66">
+ <b>Help</b>
+ </td>
+ <td bgcolor="#ffff99">
+ use this to find directories and files which can be used below
+ <form name="helpForm" action="<?php print $_SERVER['PHP_SELF']; ?>" method="get"
+ enctype="multipart/form-data">
+ <input size="80" type="text" name="fileName" value="<?php print $filename;?>">
+ <input type="submit" name="helpdata" value="browse tree">
+ </form>
+<div id='menuLayer'></div>
+<?php
+ $DHTMLmenu->printMenu();
+?>
+ </td>
+ </tr>
+ </table>
+
+ <form name="dataForm" action="<?php print $_SERVER['PHP_SELF']; ?>" method="GET" onsubmit=
+ "return validate()">
+ <table cellpadding="3" cellspacing="3" border="0" width="80%"
+ bgcolor="#000000">
+ <tr>
+ <td bgcolor="#3399ff">
+ <b>Use a pre-created config file for form values.</b>
+ </td>
+ <td bgcolor="#CCCCCC">
+ Normally, phpDocumentor uses the form values from this form to set up parsing. In version 1.2,
+ phpDocumentor allows you to "save" form values in configuration files so that you can replicate
+ common complicated documentation tasks with only one time. Just choose a config file below or create a
+ new one and refresh this page to choose it.<hr /><b>change config directory:</b><input size="20" type="text" name="altuserdir" value=""><?php if (!empty($_REQUEST['altuserdir'])) print '<br><i>changed to <b>"'.$_REQUEST['altuserdir'].'"</b></i>'; ?>
+ <b>Choose a config:</b> <select name="setting[useconfig]">
+ <option value="" <?php if (empty($_REQUEST['altuserdir'])) print 'selected'; ?>>don't use config file</option>
+ <?php
+ $dirs = array();
+ $dirs = phpDocumentor_ConfigFileList($configdir);
+ $path = '';
+ $sel = ' selected';
+ if (!empty($_REQUEST['altuserdir'])) $path = $configdir . PATH_DELIMITER;
+ else $sel = '';
+ foreach($dirs as $configfile)
+ {
+ print '<option value="'.$path.$configfile.'"'.$sel.'>'.$configfile.".ini</option>\n";
+ $sel = '';
+ }
+ ?>
+ </select><input type="SUBMIT" value=
+ "Go" name="submitButton"><br>
+ </td>
+ </tr>
+ </tr>
+ <td bgcolor="#66cc66">
+ <b>Target</b>
+ </td>
+ <td bgcolor="#eeeeee">
+ Target is the directory where
+ the output produced by phpDocumentor will reside<br>
+ <input type="TEXT" name="setting[target]" size=
+ "80"><br>
+ <a href=
+ "javascript:addDirectory(document.dataForm.elements[3])">
+ Add the directory in the help box</a>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#3399ff">
+ <b>Files to parse</b>
+ </td>
+ <td bgcolor="#CCCCCC">
+ This is a group of comma-separated names of php files
+ or tutorials that will be processed by phpDocumentor.<br>
+<textarea rows="6" cols="80" name=
+"setting[filename]"></textarea> <br>
+ <a href=
+ "javascript:addFile(document.dataForm.elements[4])">
+ Add the file in the help box</a>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#66cc66">
+ <b>Directory to parse</b>
+ </td>
+ <td bgcolor="#eeeeee">
+ This is a group of comma-separated directories where php files
+ or tutorials are found that will be processed by phpDocumentor.
+ phpDocumentor automatically parses subdirectories<br>
+<textarea rows="6" cols="80" name="setting[directory]"></textarea> <br>
+ <a href=
+ "javascript:addDirectory(document.dataForm.elements[5])">
+ Add the directory in the help box</a>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#66cc66">
+ <b>Files to ignore</b>
+ </td>
+ <td bgcolor="#eeeeee">
+ A list of files (full path or filename), and patterns
+ to ignore. Patterns may use wildcards * and ?. To
+ ignore all subdirectories named "test" for example,
+ using "test/" To ignore all files and directories
+ with test in their name use "*test*"
+<textarea rows="6" cols="80" name="setting[ignore]"></textarea> <br>
+ <a href=
+ "javascript:addDirectory(document.dataForm.elements[6])">
+ Add the directory in the help box</a>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#66cc66">
+ <b>Generated Documentation Title</b>
+ </td>
+ <td bgcolor="#eeeeee">
+ Choose a title for the generated documentation<br>
+ <input type="TEXT" name="setting[title]" size=
+ "80" value="Generated Documentation"><br>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#3399ff">
+ <b>Default Package Name</b>
+ </td>
+ <td bgcolor="#cccccc">
+ Choose a name for the default package<br>
+ <input type="TEXT" name="setting[defaultpackagename]" size=
+ "80" value="default"><br>
+ </td>
+ <tr>
+ <tr>
+ <td bgcolor="#3399ff">
+ <b>Custom Tags</b>
+ </td>
+ <td bgcolor="#CCCCCC">
+ Custom Tags is a comma-separated list of tags
+ you want phpDocumentor to include as valid tags
+ in this parse. An example would be "value, size"
+ to allow @value and @size tags.
+ <input type="TEXT" name="setting[customtags]" size=
+ "80"><br>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#66cc66">
+ <b>Packages to parse</b>
+ </td>
+ <td bgcolor="#eeeeee">
+ The parameter packages is a group of comma
+ separated names of abstract packages that will
+ be processed by phpDocumentor. All package names must be
+ separated by commas.<br>
+<textarea rows="3" cols="80" name=
+"setting[packageoutput]"></textarea> <br>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#3399ff">
+ <b>Output Information</b>
+ </td>
+ <td bgcolor="#CCCCCC">
+ <br>
+ Outputformat
+ may be HTML, XML, PDF, or CHM (case-sensitive) in version 1.2. There is only one Converter
+ for both CHM and PDF, <b>default</b>. There are 2 HTML Converters,
+ <b>frames</b> and <b>Smarty</b>. <b>frames templates</b> may be any of:<br><br>
+ <b>default, l0l33t, phpdoc.de, phphtmllib, phpedit, DOM/default, DOM/l0l33t, or DOM/phpdoc.de</b>.
+ <b>Smarty templates</b> may be any of:<br><br>
+ <b>default or PHP</b>.<br>
+<br>
+There is only 1 template for all other Converters, <b>default</b>
+<br>Output type:Converter name:template name <input type=
+ "TEXT" name="setting[output]" value=
+ "HTML:Smarty:default" size="80"><br>
+<select name="ConverterSetting">
+<option value="HTML:frames:default">HTML:frames:default</option>
+<option value="HTML:frames:l0l33t">HTML:frames:l0l33t</option>
+<option value="HTML:frames:phpdoc.de">HTML:frames:phpdoc.de</option>
+<option value="HTML:frames:phphtmllib">HTML:frames:phphtmllib</option>
+<option value="HTML:frames:phpedit">HTML:frames:phpedit</option>
+<option value="HTML:frames:DOM/default">HTML:frames:DOM/default</option>
+<option value="HTML:frames:DOM/l0l33t">HTML:frames:DOM/l0l33t</option>
+<option value="HTML:frames:DOM/phpdoc.de">HTML:frames:DOM/phpdoc.de</option>
+<option value="HTML:Smarty:default" SELECTED>HTML:Smarty:default</option>
+<option value="PDF:default:default">PDF:default:default</option>
+<option value="CHM:default:default">CHM:default:default</option>
+<option value="XML:DocBook/peardoc2:default">XML:DocBook/peardoc2:default</option>
+</select><br>
+<a href=
+ "javascript:addConverter(document.dataForm.elements[11])">
+ Add the converter in the help box</a> <br>
+<a href=
+ "javascript:replaceConverter(document.dataForm.elements[11])">
+ Use ONLY the converter in the help box</a>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#3399ff">
+ <b>Parse @access private</b>
+ </td>
+ <td bgcolor="#CCCCCC">
+ The parameter Parse @access private tells phpDocumentor
+ whether to parse elements with an "@access private" tag in their docblock<br>
+ <input type="checkbox" name="setting[parseprivate]" value="on">Parse private <br>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#66cc66">
+ <b>JavaDoc-compliant Description parsing.</b>
+ </td>
+ <td bgcolor="#eeeeee">
+ Normally, phpDocumentor uses several rules to determine the short description. This switch
+ asks phpDocumentor to simply search for the first period (.) and use it to delineate the short
+ description. In addition, the short description will not be separated from the long description<br>
+ <input type="checkbox" name="setting[javadocdesc]" value="on">JavaDoc-compliant Description <br>
+ </td>
+ </tr>
+ </table>
+ <input type="HIDDEN" name="interface" value="web"> <input type=
+ "HIDDEN" name="submit" value="true"> <input type="SUBMIT" value=
+ "Create Documentation" name="submitButton">
+ </form>
+ <br>
+ <br>
+ <br>
+ <p>
+ Joshua Eichorn <a href="mailto:jeichorn@phpdoc.org">jeichorn@phpdoc.org</a><br>
+ Juan Pablo Morales <a href=
+ "mailto:ju-moral@uniandes.edu.co">ju-moral@uniandes.edu.co</a><br>
+ Gregory Beaver <a href=
+ "mailto:cellog@users.sourceforge.net">cellog@users.sourceforge.net</a>
+ </p>
+ <p>
+ If you have any problems with phpDocumentor, please visit the website: <a
+ href='http://phpdocu.sourceforge.net'>phpdocu.sourceforge.net</a> and
+ submit a bug
+ </p>
+ <!-- Created: Tue Jun 26 18:52:40 MEST 2001 -->
+ <!-- hhmts start -->
+<pre>
+Last modified: $Date$
+Revision: $Revision$
+</pre>
+ <!-- hhmts end -->
+ <?php } //End the else that prints all code
+ ?>
+ </body>
+</html>
+
View
2,599 package.xml
2,599 additions, 0 deletions not shown
View
38 pear-phpdoc
@@ -0,0 +1,38 @@
+#!@PHP-BIN@
+<?php
+//
+// PhpDoc, a program for creating javadoc style documentation from php code
+// Copyright (C) 2000-2001 Joshua Eichorn
+//
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+
+//
+// Copyright 2000-2001 Joshua Eichorn
+// Email jeichorn@phpdoc.org
+// Web http://phpdoc.org/
+// Mirror http://phpdocu.sourceforge.net/
+// Project http://sourceforge.net/projects/phpdocu/
+//
+
+/**
+ * PHP auto documentor, like javadoc
+ * If you get an error uses this as a shell script then its been dosified
+ * @author Joshua Eichorn
+ * @version 1.3.0
+ * @copyright Joshua Eichorn
+ */
+include("PhpDocumentor/phpDocumentor/phpdoc.inc");
+?>
View
145 pear-phpdoc.bat
@@ -0,0 +1,145 @@
+@ECHO OFF
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+::
+:: Batch file to start phpDocumentor with PHP's CLI
+::
+:: This SW was contributed by BlueShoes www.blueshoes.org "The PHP Framework"
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+::----------------------------------------------------------------------------------
+:: Please set following to PHP's CLI
+:: NOTE: In PHP 4.2.x the PHP-CLI used to be named php-cli.exe.
+:: PHP 4.3.x names it php.exe but stores it in a subdir called /cli/php.exe
+:: E.g. for PHP 4.2 C:\phpdev\php-4.2-Win32\php-cli.exe
+:: for PHP 4.3 C:\phpdev\php-4.3-Win32\cli\php.exe
+
+ SET phpCli=@PHP-BIN@
+
+
+
+::---------------------------------------------------------------------------------
+::---------------------------------------------------------------------------------
+:: Do not modify below this line!! (Unless you know what your doing :)
+::---------------------------------------------------------------------------------
+::---------------------------------------------------------------------------------
+
+:: Only show this intro when no options are passed
+IF '%1'=='' (
+ ECHO ******************************************************************************
+ ECHO * PhpDocument Command-Line Starter
+ ECHO *
+ ECHO * phpDocumentor is a JavaDoc-like automatic documentation generator for PHP
+ ECHO * written in PHP. It is the most versatile tool for documenting PHP.
+ ECHO *
+ ECHO * This batch-file will try to run the phpDocumentor using the command-line
+ ECHO * version of PHP4. NOTE: It will not run with the PHP ISAPI module!
+ ECHO * Please update the path in this batch-file to your PHP-CLI.
+ ECHO *
+ ECHO * Tip: o Grab a copy of one of the ini-files in the user/ dir of the
+ ECHO * phpDocumentor and modify the settings there.
+ ECHO * o To see the command line options type phpdoc -h
+ ECHO *
+ ECHO * @version 1.3 2003-06-28
+ ECHO * @author Sam Blum sam@blueshoes.org
+ ECHO * @Copyright Free Software released under the GNU/GPL license
+ ECHO *
+ ECHO * This SW was contributed by BlueShoes www.blueshoes.org "The PHP Framework"
+ ECHO ******************************************************************************
+)
+
+:: Check existence of php.exe
+IF EXIST "%phpCli%" (
+ SET doNothing=
+) ELSE GOTO :NoPhpCli
+
+:: If called using options, just call phpdoc and end after without pausing.
+:: This will allow use where pausing is not wanted.
+IF '%1'=='' (
+ SET doNothing=
+) ELSE (
+ "%phpCli%" "@BIN-DIR@\phpdoc" %*
+ GOTO :EOF
+)
+
+
+SET iniFile=
+
+ECHO ------------------------------------------------------------------------------
+ECHO Select Ini-File [default is phpDocumentor.ini]
+ECHO ------------------------------------------------------------------------------
+ECHO # 0: phpDocumentor.ini
+SET count=0
+FOR /R "@DATA-DIR@\PhpDocumentor\user" %%I IN (*.ini) DO (
+ SET /a count+=1
+ CALL :exec ECHO # %%count%%: %%~nI%%~xI
+)
+
+:LOOP_1
+:: SET /P prompts for input and sets the variable
+:: to whatever the user types
+SET iniNr=
+SET /P iniNr=Type a number and press Enter[0]:
+
+:: Use default
+IF '%iniNr%'=='' (
+ SET iniNr=0
+)
+
+:: Check for default selection
+SET iniFile=phpDocumentor.ini
+IF %iniNr%==0 (
+ CALL :exec GOTO :run
+ GOTO :PAUSE_END
+)
+
+:: Check selected
+SET count=0
+SET found=
+FOR /R "@DATA-DIR@\PhpDocumentor\user" %%I IN (*.ini) DO (
+ SET /a count+=1
+ SET iniFile=%%~nI%%~xI
+ CALL :exec IF '%%iniNr%%'=='%%count%%' GOTO :run
+)
+
+:: Check if selected # was found
+IF '%found%'=='' (
+ ECHO Invalid input [%iniNr%]... try again
+ ECHO.
+ GOTO :LOOP_1
+)
+
+::
+:: php.exe not found error
+GOTO :PAUSE_END
+:NoPhpCli
+ECHO ** ERROR *****************************************************************
+ECHO * Sorry, can't find the php.exe file.
+ECHO * You must edit this file to point to your php.exe (CLI version!)
+ECHO * [Currently set to %phpCli%]
+ECHO *
+ECHO * NOTE: In PHP 4.2.x the PHP-CLI used to be named php-cli.exe.
+ECHO * PHP 4.3.x renamed it php.exe but stores it in a subdir
+ECHO * called /cli/php.exe
+ECHO * E.g. for PHP 4.2 C:\phpdev\php-4.2-Win32\php-cli.exe
+ECHO * for PHP 4.3 C:\phpdev\php-4.3-Win32\cli\php.exe
+ECHO **************************************************************************
+
+::
+:: Stupid MS-batch: Can't evaluate environment variable inside a FOR loop!!! :((
+GOTO :PAUSE_END
+:exec
+%*
+GOTO :EOF
+
+::
+:: Start the phpDocumentor
+GOTO :PAUSE_END
+:run
+SET found=1
+ECHO Starting: "%phpCli%" "@BIN-DIR@\phpdoc" -c "%iniFile%"
+ECHO.
+"%phpCli%" "@BIN-DIR@\phpdoc" -c "%iniFile%"
+GOTO :EOF
+
+:PAUSE_END
+PAUSE
View
118 phpDocumentor.ini
@@ -0,0 +1,118 @@
+;; phpDocumentor.ini
+;;
+;; contains all the runtime values that are configurable.
+;; This is moved from phpdoc.inc, to remove the necessity to edit the php code and
+;; simplify debugging
+[DEBUG]
+;; If you want to see the internals of the parser in action, set this to true
+PHPDOCUMENTOR_DEBUG = false
+;; set to true if you want to eliminate extra whitespace in doc comments (slows things down quite a bit)
+PHPDOCUMENTOR_KILL_WHITESPACE = false
+
+[_phpDocumentor_options]
+;; this is the value that will be displayed as the root directory
+Program_Root =
+;; uncomment this to set the path phpDocumentor looks in to find user files
+;userdir = user/
+
+;; Use useconfig if you want to be able to run phpdoc with no command-line options (!!)
+;; change the value of useconfig to an .ini file that is in users/ (like greg.ini)
+;[_phpDocumentor_setting]
+;useconfig = default
+
+[_phpDocumentor_phpfile_exts]
+php
+php3
+php4
+phtml
+inc
+
+;; deprecated in 1.2
+;; this list is informational only - the following tags will be parsed as
+;; having meaning, everything else will be treated as text by the output
+;; converter, meaning in the HTML converter, all other tags will be htmlentitied
+;[_phpDocumentor_html_allowed]
+;ul
+;ol
+;li
+;p
+;strong
+;pre
+;a
+;code
+;br
+;var
+;samp
+;kbd
+
+[_phpDocumentor_tags_allowed]
+abstract
+access
+author
+category
+copyright
+;; for Zend IDE support - minimal at best
+desc
+deprec
+deprecated
+example
+exception
+filesource
+final
+global
+ignore
+internal
+license
+link
+magic
+name
+package
+param
+parameter
+return
+;; alias for @return
+returns
+see
+since
+source
+static
+staticvar
+subpackage
+throws
+todo
+TODO
+tutorial
+uses
+var
+version
+;; compat tags, things wont parse right in incorrectly documented code without them
+;; hopefully better error handling in handleDockeyword allows these to go away
+;; this is a dumb tag included for pear compatability see bug# 558028
+extends
+private
+public
+
+[_phpDocumentor_inline_doc_tags_allowed]
+example
+inheritdoc
+internal
+link
+source
+tutorial
+
+[_phpDocumentor_inline_tutorial_tags_allowed]
+category
+example
+id
+link
+toc
+tutorial
+
+;; custom files to include in RIC
+;; these MUST be in upper-case
+[_phpDocumentor_RIC_files]
+README
+INSTALL
+CHANGELOG
+FAQ
+NEWS
View
52 phpdoc
@@ -0,0 +1,52 @@
+#!/bin/sh
+PHP=`which php`
+exec $PHP -C -q -d output_buffering=1 $0 $@
+<?php
+//
+// PhpDoc, a program for creating javadoc style documentation from php code
+// Copyright (C) 2000-2001 Joshua Eichorn
+//
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+
+//
+// Copyright 2000-2003 Joshua Eichorn
+// Email jeichorn@phpdoc.org
+// Web http://phpdoc.org/
+// Mirror http://phpdocu.sourceforge.net/
+// Project http://sourceforge.net/projects/phpdocu/
+//
+
+ob_end_clean(); // make output from autofind php code disapear
+
+/**
+ * PHP auto documentor, like javadoc
+ * If you get an error uses this as a shell script then its been dosified
+ * @author Joshua Eichorn
+ * @version 1.3.0
+ * @copyright Joshua Eichorn
+ */
+/**
+ * utility: determine whether we're in PEAR or not
+ */
+$test = @include("phpDocumentor/find_phpdoc.php");
+if ($test == 6) // find_phpdoc.php returns 6
+{
+ include("phpDocumentor/phpdoc.inc");
+} else
+{
+ echo "Error: phpDocumentor not found\n";
+}
+?>
View
145 phpdoc.bat
@@ -0,0 +1,145 @@
+@ECHO OFF
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+::
+:: Batch file to start phpDocumentor with PHP's CLI
+::
+:: This SW was contributed by BlueShoes www.blueshoes.org "The PHP Framework"
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+::----------------------------------------------------------------------------------
+:: Please set following to PHP's CLI
+:: NOTE: In PHP 4.2.x the PHP-CLI used to be named php-cli.exe.
+:: PHP 4.3.x names it php.exe but stores it in a subdir called /cli/php.exe
+:: E.g. for PHP 4.2 C:\phpdev\php-4.2-Win32\php-cli.exe
+:: for PHP 4.3 C:\phpdev\php-4.3-Win32\cli\php.exe
+
+ SET phpCli=C:\usr\local\php\cli\php.exe
+
+
+
+::---------------------------------------------------------------------------------
+::---------------------------------------------------------------------------------
+:: Do not modify below this line!! (Unless you know what your doing :)
+::---------------------------------------------------------------------------------
+::---------------------------------------------------------------------------------
+
+:: Only show this intro when no options are passed
+IF '%1'=='' (
+ ECHO ******************************************************************************
+ ECHO * PhpDocument Command-Line Starter
+ ECHO *
+ ECHO * phpDocumentor is a JavaDoc-like automatic documentation generator for PHP
+ ECHO * written in PHP. It is the most versatile tool for documenting PHP.
+ ECHO *
+ ECHO * This batch-file will try to run the phpDocumentor using the command-line
+ ECHO * version of PHP4. NOTE: It will not run with the PHP ISAPI module!
+ ECHO * Please update the path in this batch-file to your PHP-CLI.
+ ECHO *
+ ECHO * Tip: o Grab a copy of one of the ini-files in the user/ dir of the
+ ECHO * phpDocumentor and modify the settings there.
+ ECHO * o To see the command line options type phpdoc -h
+ ECHO *
+ ECHO * @version 1.3 2003-06-28
+ ECHO * @author Sam Blum sam@blueshoes.org
+ ECHO * @Copyright Free Software released under the GNU/GPL license
+ ECHO *
+ ECHO * This SW was contributed by BlueShoes www.blueshoes.org "The PHP Framework"
+ ECHO ******************************************************************************
+)
+
+:: Check existence of php.exe
+IF EXIST "%phpCli%" (
+ SET doNothing=
+) ELSE GOTO :NoPhpCli
+
+:: If called using options, just call phpdoc and end after without pausing.
+:: This will allow use where pausing is not wanted.
+IF '%1'=='' (
+ SET doNothing=
+) ELSE (
+ "%phpCli%" phpdoc %*
+ GOTO :EOF
+)
+
+
+SET iniFile=
+
+ECHO ------------------------------------------------------------------------------
+ECHO Select Ini-File [default is phpDocumentor.ini]
+ECHO ------------------------------------------------------------------------------
+ECHO # 0: phpDocumentor.ini
+SET count=0
+FOR /R user %%I IN (*.ini) DO (
+ SET /a count+=1
+ CALL :exec ECHO # %%count%%: %%~nI%%~xI
+)
+
+:LOOP_1
+:: SET /P prompts for input and sets the variable
+:: to whatever the user types
+SET iniNr=
+SET /P iniNr=Type a number and press Enter[0]:
+
+:: Use default
+IF '%iniNr%'=='' (
+ SET iniNr=0
+)
+
+:: Check for default selection
+SET iniFile=phpDocumentor.ini
+IF %iniNr%==0 (
+ CALL :exec GOTO :run
+ GOTO :PAUSE_END
+)
+
+:: Check selected
+SET count=0
+SET found=
+FOR /R user %%I IN (*.ini) DO (
+ SET /a count+=1
+ SET iniFile=%%~nI%%~xI
+ CALL :exec IF '%%iniNr%%'=='%%count%%' GOTO :run
+)
+
+:: Check if selected # was found
+IF '%found%'=='' (
+ ECHO Invalid input [%iniNr%]... try again
+ ECHO.
+ GOTO :LOOP_1
+)
+
+::
+:: php.exe not found error
+GOTO :PAUSE_END
+:NoPhpCli
+ECHO ** ERROR *****************************************************************
+ECHO * Sorry, can't find the php.exe file.
+ECHO * You must edit this file to point to your php.exe (CLI version!)
+ECHO * [Currently set to %phpCli%]
+ECHO *
+ECHO * NOTE: In PHP 4.2.x the PHP-CLI used to be named php-cli.exe.
+ECHO * PHP 4.3.x renamed it php.exe but stores it in a subdir
+ECHO * called /cli/php.exe
+ECHO * E.g. for PHP 4.2 C:\phpdev\php-4.2-Win32\php-cli.exe
+ECHO * for PHP 4.3 C:\phpdev\php-4.3-Win32\cli\php.exe
+ECHO **************************************************************************
+
+::
+:: Stupid MS-batch: Can't evaluate environment variable inside a FOR loop!!! :((
+GOTO :PAUSE_END
+:exec
+%*
+GOTO :EOF
+
+::
+:: Start the phpDocumentor
+GOTO :PAUSE_END
+:run
+SET found=1
+ECHO Starting: "%phpCli%" phpdoc -c "%iniFile%"
+ECHO.
+"%phpCli%" phpdoc -c "%iniFile%"
+GOTO :EOF
+
+:PAUSE_END
+PAUSE
View
469 phpdoc.php
@@ -0,0 +1,469 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<?php
+/**
+ * Web Interface to phpDocumentor
+ * @see new_phpdoc.php
+ * @filesource
+ * @deprecated in favor of docbuilder (see {@link docbuilder/config.php})
+ * @package phpDocumentor
+ */
+//
+//
+// An HTML interface for Joshua Eichorn's phpDocumentor
+// Author: Juan Pablo Morales <ju-moral@uniandes.edu.co>
+// Joshua Eichorn <jeichorn@phpdoc.org>
+// Gregory Beaver <cellog@users.sourceforge.net>
+//
+// phpDocumentor, a program for creating javadoc style documentation from php code
+// Copyright (C) 2000-2002 Joshua Eichorn
+//
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+//
+// Copyleft 2001 Juan Pablo Morales
+
+// set up include path so we can find all files, no matter what
+$GLOBALS['_phpDocumentor_install_dir'] = dirname(realpath(__FILE__));
+// add my directory to the include path, and make it first, should fix any errors
+if (substr(PHP_OS, 0, 3) == 'WIN')
+ini_set('include_path',$GLOBALS['_phpDocumentor_install_dir'].';'.ini_get('include_path'));
+else
+ini_set('include_path',$GLOBALS['_phpDocumentor_install_dir'].':'.ini_get('include_path'));
+
+/**
+* common file information
+*/
+include_once("phpDocumentor/common.inc.php");
+if (!function_exists('version_compare'))
+{
+ print "phpDocumentor requires PHP version 4.1.0 or greater to function";
+ exit;
+}
+
+// find the .ini directory by parsing phpDocumentor.ini and extracting _phpDocumentor_options[userdir]
+$ini = phpDocumentor_parse_ini_file($_phpDocumentor_install_dir . PATH_DELIMITER . 'phpDocumentor.ini', true);
+if (isset($ini['_phpDocumentor_options']['userdir']))
+ $configdir = $ini['_phpDocumentor_options']['userdir'];
+else
+ $configdir = $_phpDocumentor_install_dir . '/user';
+
+// allow the user to change this at runtime
+if (!empty($_REQUEST['altuserdir'])) $configdir = $_REQUEST['altuserdir'];
+?>
+<html>
+ <head>
+ <title>
+ Form to submit to phpDocumentor v<?php print PHPDOCUMENTOR_VER; ?>
+ </title>
+ <?php if(!isset($_GET['submit']) || !empty($_REQUEST['altuserdir'])) {
+?>
+<script type="text/javascript" language="Javascript">
+/**
+ Creates some global variables
+*/
+function initializate() {
+ //
+ //The "platform independent" newLine
+ //
+ //Taken from http://developer.netscape.com/docs/manuals/communicator/jsref/brow1.htm#1010426
+if (navigator.appVersion.lastIndexOf('Win') != -1)
+ $newLine="\r\n";
+ else
+ $newLine="\n";
+/* for($a=0;$a<document.dataForm.elements.length;$a++) {
+ alert("The name is '"+document.dataForm.elements[$a].name+"' "+$a);
+ }
+*/
+}
+/**Adds the contents of the help box as a directory
+*/
+function addDirectory($object) {
+ $object.value = prepareString($object.value)+document.helpForm.fileName.value;
+}
+/**Adds the contents of the converter box to the converters list
+*/
+function addConverter($object) {
+ $object.value = prepareString($object.value)+document.dataForm.ConverterSetting.value;
+}
+/**Adds the contents of the help box as a file to the given control
+*/
+function addFile($object) {
+ $object.value = prepareString($object.value)+document.helpForm.fileName.value;
+}
+/**Takes a given string and leaves it ready to add a new string
+ That is, puts the comma and the new line if needed
+*/
+function prepareString($myString) {
+ //First verify that a comma is not at the end
+ if($myString.lastIndexOf(",") >= $myString.length-2) {
+ //We have a comma at the end
+ return $myString;
+ }
+ if($myString.length > 0) {
+ $myString+=","+$newLine;
+ }
+ return $myString;
+}
+/**Do the validation needed before sending the from and return a truth value indicating if the form can be sent
+*/
+ function validate() {
+ //Take out all newLines and change them by nothing
+ //This could be done by using javascript function's replacebut that was implemented only until Navigator 4.0 and so it is better to use more backward compatible functions like substr
+ document.dataForm.elements[0].value= stripNewLines(document.dataForm.elements[0].value);
+ document.dataForm.elements[1].value= stripNewLines(document.dataForm.elements[1].value);
+ document.dataForm.elements[2].value= stripNewLines(document.dataForm.elements[2].value);
+ document.dataForm.elements[3].value= stripNewLines(document.dataForm.elements[3].value);
+ document.dataForm.elements[4].value= stripNewLines(document.dataForm.elements[4].value);
+ document.dataForm.elements[5].value= stripNewLines(document.dataForm.elements[5].value);
+ document.dataForm.elements[6].value= stripNewLines(document.dataForm.elements[6].value);
+ document.dataForm.elements[7].value= stripNewLines(document.dataForm.elements[7].value);
+ //By returning true we are allowing the form to be submitted
+ return true;
+ }
+/**Takes a string and removes all the ocurrences of new lines
+Could have been implemented a lot easier with replace but it's not very backwards compatible
+*/
+ function stripNewLines($myString) {
+ return myReplace($myString,$newLine,'');
+ }
+ function myReplace($string,$text,$by) {
+ // Replaces text with by in string
+ var $strLength = $string.length, $txtLength = $text.length;
+ if (($strLength == 0) || ($txtLength == 0)) return $string;
+
+ var $i = $string.indexOf($text);
+ if ((!$i) && ($text != $string.substring(0,$txtLength))) return $string;
+ if ($i == -1) return $string;
+
+ var $newstr = $string.substring(0,$i) + $by;
+
+ if ($i+$txtLength < $strLength)
+ $newstr += myReplace($string.substring($i+$txtLength,$strLength),$text,$by);
+
+ return $newstr;
+ }
+</script><?php } ?>
+ </head>
+ <?php
+ //Find out if we are submitting and if we are, send it
+ // This code originally by Joshua Eichorn on phpdoc.php
+ //
+ if(isset($_GET['submit']) && empty($_REQUEST['altuserdir'])) {
+ echo "<body bgcolor=\"#ffffff\">";
+ echo "<h1>Parsing Files ...</h1>";
+ flush();
+ echo "<pre>\n";
+ /** phpdoc.inc */
+ include("phpDocumentor/phpdoc.inc");
+ echo "</pre>\n";
+ echo "<h1>Operation Completed!!</h1>";
+ } else {
+ ?>
+ <body bgcolor="#ffffff" onload="javascript:initializate()">
+ <h1>
+ Form to submit to phpDocumentor v<?php print PHPDOCUMENTOR_VER; ?>
+ </h1>
+ <form name="dataForm" action="phpdoc.php" method="GET" onsubmit=
+ "return validate()">
+ <div align="center">
+ <table cellpadding="0" cellspacing="0" border="0" width="80%"
+ bgcolor="#000000">
+ <tr>
+ <td>
+ <table cellpadding="0" cellspacing="1" border="0" width=
+ "100%">
+ <tr>
+ <td bgcolor="#ff6633">
+ <b>Use a pre-created config file for form values.</b>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#CCCCCC">
+ Normally, phpDocumentor uses the form values from this form to set up parsing. In version 1.2,
+ phpDocumentor allows you to "save" form values in configuration files so that you can replicate
+ common complicated documentation tasks with only one time. Just choose a config file below or create a
+ new one and refresh this page to choose it.<hr /><b>change config directory:</b><input size="20" type="text" name="altuserdir" value=""><?php if (!empty($_REQUEST['altuserdir'])) print '<br><i>changed to <b>"'.$_REQUEST['altuserdir'].'"</b></i>'; ?>
+ <b>Choose a config:</b> <select name="setting[useconfig]">
+ <option value="" <?php if (empty($_REQUEST['altuserdir'])) print 'selected'; ?>>don't use config file</option>
+ <?php
+ $dirs = array();
+ $dirs = phpDocumentor_ConfigFileList($configdir);
+ $path = '';
+ $sel = ' selected';
+ if (!empty($_REQUEST['altuserdir'])) $path = $configdir . PATH_DELIMITER;
+ else $sel = '';
+ foreach($dirs as $configfile)
+ {
+ print '<option value="'.$path.$configfile.'"'.$sel.'>'.$configfile.".ini</option>\n";
+ $sel = '';
+ }
+ ?>
+ </select><input type="SUBMIT" value=
+ "Go" name="submitButton"><br>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#ffdddd">
+ <b>Generated Documentation Title</b>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#eeeeee">
+ Choose a title for the generated documentation<br>
+ <input type="TEXT" name="setting[title]" size=
+ "80" value="Generated Documentation"><br>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#ff6633">
+ <b>Default Package Name</b>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#cccccc">
+ Choose a name for the default package<br>
+ <input type="TEXT" name="setting[defaultpackagename]" size=
+ "80" value="default"><br>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#ffdddd">
+ <b>Target</b>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#eeeeee">
+ Target is the directory where
+ the output produced by phpDocumentor will reside<br>
+ <input type="TEXT" name="setting[target]" size=
+ "80"><br>
+ <a href=
+ "javascript:addDirectory(document.dataForm.elements[5])">
+ Add the directory in the help box</a>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#ffdddd">
+ <b>Custom Tags</b>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#eeeeee">
+ Custom Tags is a comma-separated list of tags
+ you want phpDocumentor to include as valid tags
+ in this parse. An example would be "value, size"
+ to allow @value and @size tags.
+ <input type="TEXT" name="setting[customtags]" size=
+ "80"><br>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#ff6633">
+ <b>Packages to parse</b>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#CCCCCC">
+ The parameter packages is a group of comma
+ separated names of abstract packages that will
+ be processed by phpDocumentor. All package names must be
+ separated by commas.<br>
+<textarea rows="3" cols="80" name=
+"setting[packageoutput]"></textarea> <br>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#ffdddd">
+ <b>Files to parse</b>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#eeeeee">
+ This is a group of comma-separated names of php files
+ or tutorials that will be processed by phpDocumentor.<br>
+<textarea rows="6" cols="80" name=
+"setting[filename]"></textarea> <br>
+ <a href=
+ "javascript:addFile(document.dataForm.elements[8])">
+ Add the file in the help box</a>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#ff6633">
+ <b>Directory to parse</b>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#CCCCCC">
+ This is a group of comma-separated directories where php files
+ or tutorials are found that will be processed by phpDocumentor.
+ phpDocumentor automatically parses subdirectories<br>
+<textarea rows="6" cols="80" name="setting[directory]"></textarea> <br>
+ <a href=
+ "javascript:addDirectory(document.dataForm.elements[9])">
+ Add the directory in the help box</a>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#ffdddd">
+ <b>Output Information</b>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#eeeeee">
+ <br>
+ Output Information is a comma-separated list of <b>Outputformat:Converter:Templates</b>
+ to apply to the output. The Converters must be classes descended from Converter
+ defined in the phpDocumentor files, or parsing will not work. Outputformat
+ may be HTML, XML, PDF, or CHM (case-sensitive) in version 1.2. There is only one Converter
+ for both CHM and PDF, <b>default</b>. There are 2 HTML Converters,
+ <b>frames</b> and <b>Smarty</b>. <b>frames templates</b> may be any of:<br><br>
+ <b>default, l0l33t, phpdoc.de, phphtmllib, phpedit, DOM/default, DOM/l0l33t, or DOM/phpdoc.de</b>.
+ <b>Smarty templates</b> may be any of:<br><br>
+ <b>default or PHP</b>.
+ <br>
+ There is only 1 template for all other Converters, <b>default</b>
+ <br>Output type:Converter name:template name <input type=
+ "TEXT" name="setting[output]" value=
+ "HTML:Smarty:default" size="80"><br>
+ <select name="ConverterSetting">
+ <option value="HTML:frames:default">HTML:frames:default</option>
+ <option value="HTML:frames:l0l33t">HTML:frames:l0l33t</option>
+ <option value="HTML:frames:phpdoc.de">HTML:frames:phpdoc.de</option>
+ <option value="HTML:frames:phphtmllib">HTML:frames:phphtmllib</option>
+ <option value="HTML:frames:phpedit">HTML:frames:phpedit</option>
+ <option value="HTML:frames:DOM/default">HTML:frames:DOM/default</option>
+ <option value="HTML:frames:DOM/l0l33t">HTML:frames:DOM/l0l33t</option>
+ <option value="HTML:frames:DOM/phpdoc.de">HTML:frames:DOM/phpdoc.de</option>
+ <option value="HTML:Smarty:default" SELECTED>HTML:Smarty:default</option>
+ <option value="HTML:Smarty:PHP">HTML:Smarty:PHP</option>
+ <option value="PDF:default:default">PDF:default:default</option>
+ <option value="CHM:default:default">CHM:default:default</option>
+ <option value="XML:DocBook/peardoc2:default">XML:DocBook/peardoc2:default</option>
+</select><br>
+ <a href=
+ "javascript:addConverter(document.dataForm.elements[10])">
+ Add the converter in the help box</a>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#ff6633">
+ <b>Files to ignore</b>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#CCCCCC">
+ A list of files (full path or filename), and patterns
+ to ignore. Patterns may use wildcards * and ?. To
+ ignore all subdirectories named "test" for example,
+ using "test/" To ignore all files and directories
+ with test in their name use "*test*"
+<textarea rows="6" cols="80" name="setting[ignore]"></textarea> <br>
+ <a href=
+ "javascript:addDirectory(document.dataForm.elements[12])">
+ Add the directory in the help box</a>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#ff6633">
+ <b>Parse @access private</b>