1<?php 2/** 3 * A complex example 4 * 5 * @category PEAR 6 * @package PEAR_PackageFileManager 7 * @author Greg Beaver <cellog@php.net> 8 * @copyright 2003-2015 The PEAR Group 9 * @license http://www.php.net/license/3_01.txt PHP License 3.01 10 * @link http://pear.php.net/package/PEAR_PackageFileManager 11 * @since File available since Release 0.12 12 * @ignore 13 */ 14 15require_once 'PEAR/PackageFileManager.php'; 16PEAR::setErrorHandling(PEAR_ERROR_DIE); 17 18$test = new PEAR_PackageFileManager(); 19 20// directory that phpDocumentor 1.2.2 CVS is located in 21$packagedir = 'C:/Web Pages/chiara/phpdoc'; 22 23$test->setOptions(array( 24 'summary' => 'phpDocumentor package provides automatic documenting of php api directly from the source', 25 'description' => 'phpDocumentor tool is a standalone auto-documentor similar to JavaDoc written in PHP', 26 'baseinstalldir' => 'PhpDocumentor', 27 'version' => '1.2.2', 28 'packagedirectory' => $packagedir, 29 'state' => 'stable', 30 'filelistgenerator' => 'cvs', 31 'notes' => 'Bugfix release 32 33- DocBook/peardoc2 converter outputs valid DocBook 34- fixed Page-Level DocBlock issues, now a page-level 35 docblock is the first docblock in a file if it contains 36 a @package tag, UNLESS the next element is a class. Warnings 37 raised are much more informative 38- removed erroneous warning of duplicate @package tag in certain cases 39- fixed these bugs: 40 [ 765455 ] phpdoc can\'t find php if it is in /usr/local/bin 41 [ 767251 ] broken links when no files in default package 42 [ 768947 ] Multiple vars not recognised 43 [ 772441 ] nested arrays fail parser 44', 45 'package' => 'PhpDocumentor', 46 'dir_roles' => array('Documentation' => 'doc', 'Documentation/tests' => 'test'), 47 'exceptions' => array( 48 'index.html' => 'php', 49 'docbuilder/index.html' => 'php', 50 'docbuilder/blank.html' => 'php', 51 'README' => 'doc', 52 'ChangeLog' => 'doc', 53 'PHPLICENSE.txt' => 'doc', 54 'poweredbyphpdoc.gif' => 'data', 55 'INSTALL' => 'doc', 56 'FAQ' => 'doc', 57 'Authors' => 'doc', 58 'Release-1.2.0beta1' => 'doc', 59 'Release-1.2.0beta2' => 'doc', 60 'Release-1.2.0beta3' => 'doc', 61 'Release-1.2.0rc1' => 'doc', 62 'Release-1.2.0rc2' => 'doc', 63 'Release-1.2.0' => 'doc', 64 'Release-1.2.1' => 'doc', 65 'Release-1.2.2' => 'doc', 66 'pear-phpdoc' => 'script', 67 'pear-phpdoc.bat' => 'script', 68 ), 69 'ignore' => array('package.xml', "$packagedir/phpdoc", 'phpdoc.bat', 'LICENSE'), 70 'installas' => array('pear-phpdoc' => 'phpdoc', 'pear-phpdoc.bat' => 'phpdoc.bat'), 71 'installexceptions' => array('pear-phpdoc' => '/', 'pear-phpdoc.bat' => '/', 'scripts/makedoc.sh' => '/'), 72 )); 73$test->addMaintainer('cellog', 'lead', 'Gregory Beaver', 'cellog@php.net'); 74 75$test->addPlatformException('pear-phpdoc', '(*ix|*ux)'); 76$test->addPlatformException('pear-phpdoc.bat', 'windows'); 77$test->addDependency('php', '4.1.0', 'ge', 'php'); 78// replace @PHP-BIN@ in this file with the path to php executable! pretty neat 79$test->addReplacement('pear-phpdoc', 'pear-config', '@PHP-BIN@', 'php_bin'); 80$test->addReplacement('pear-phpdoc.bat', 'pear-config', '@PHP-BIN@', 'php_bin'); 81// hack until they get their shit in line with docroot role 82$test->addRole('tpl', 'php'); 83$test->addRole('png', 'php'); 84$test->addRole('gif', 'php'); 85$test->addRole('jpg', 'php'); 86$test->addRole('css', 'php'); 87$test->addRole('js', 'php'); 88$test->addRole('ini', 'php'); 89$test->addRole('inc', 'php'); 90$test->addRole('afm', 'php'); 91$test->addRole('pkg', 'doc'); 92$test->addRole('cls', 'doc'); 93$test->addRole('proc', 'doc'); 94$test->addRole('sh', 'script'); 95if (isset($_GET['make'])) { 96 $test->writePackageFile(); 97} else { 98 $test->debugPackageFile(); 99} 100if (!isset($_GET['make'])) { 101 echo '<a href="' . $_SERVER['PHP_SELF'] . '?make=1">Make this file</a>'; 102} 103?> 104