7d35088852d32685671feb5a9c678afe1f2a8bb3
[atutor.git] / mods / phpdoc2 / PhpDocumentor / phpdoc
1 #!/bin/sh
2 if [ -z "$PHP" ]; then
3    PHP=`which php`
4 fi
5 (exec $PHP -C -q -d output_buffering=1 "$0" "$@") 2>/dev/null
6 if [ "$?" -ne "0" ]; then
7         echo "FAILED:  Bad environment variable \$PHP (set to \"$PHP\")"
8         exit 1
9 fi
10 exit 0
11 <?php
12 /**
13  * PHP auto documentor, like javadoc
14  * If you get an error uses this as a shell script then its been dosified
15  *
16  * phpDocumentor :: automatic documentation generator
17  *
18  * PHP versions 4 and 5
19  *
20  * Copyright (c) 2001-2007 Gregory Beaver
21  *
22  * LICENSE:
23  *
24  * This library is free software; you can redistribute it
25  * and/or modify it under the terms of the GNU Lesser General
26  * Public License as published by the Free Software Foundation;
27  * either version 2.1 of the License, or (at your option) any
28  * later version.
29  *
30  * This library is distributed in the hope that it will be useful,
31  * but WITHOUT ANY WARRANTY; without even the implied warranty of
32  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
33  * Lesser General Public License for more details.
34  *
35  * You should have received a copy of the GNU Lesser General Public
36  * License along with this library; if not, write to the Free Software
37  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
38  *
39  * @category  ToolsAndUtilities
40  * @package   phpDocumentor
41  * @author    Joshua Eichorn <jeichorn@phpdoc.org>
42  * @copyright 2000-2007 Joshua Eichorn
43  * @license   http://www.opensource.org/licenses/lgpl-license.php LGPL
44  * @filesource
45  * @link      http://www.phpdoc.org
46  * @link      http://pear.php.net/PhpDocumentor
47  * @todo      CS cleanup - change package to PhpDocumentor
48  */
49
50 ob_end_clean(); // make output from autofind php code disapear
51
52 /**
53  * utility: determine whether we're in PEAR or not
54  * @internal CS Exception- logic here necessitates using an unconditional "include"
55  */
56 $test = @include "phpDocumentor/find_phpdoc.php";
57 if ($test == 6) { 
58     // find_phpdoc.php returns 6
59     include "phpDocumentor/phpdoc.inc";
60 } else {
61     echo "Error: phpDocumentor not found" . PHP_EOL;
62 }
63 ?>