pearweb_index
[ class tree: pearweb_index ] [ index: pearweb_index ] [ all elements ]

Source for file 20031114-pds.php

Documentation is available at 20031114-pds.php

  1. <?php
  2. /*
  3.    +----------------------------------------------------------------------+
  4.    | PEAR Web site version 1.0                                            |
  5.    +----------------------------------------------------------------------+
  6.    | Copyright (c) 2003-2005 The PEAR Group                               |
  7.    +----------------------------------------------------------------------+
  8.    | This source file is subject to version 2.02 of the PHP license,      |
  9.    | that is bundled with this package in the file LICENSE, and is        |
  10.    | available at through the world-wide-web at                           |
  11.    | http://www.php.net/license/2_02.txt.                                 |
  12.    | If you did not receive a copy of the PHP license and are unable to   |
  13.    | obtain it through the world-wide-web, please send a note to          |
  14.    | license@php.net so we can mail you a copy immediately.               |
  15.    +----------------------------------------------------------------------+
  16.    | Authors: Martin Jansen <mj@php.net>                                  |
  17.    +----------------------------------------------------------------------+
  18.    $Id$
  19. */
  20. response_header("The PEAR Group: Package Directory Structure");
  21. ?>
  22.  
  23. <h1>PEAR Group - Administrative Documents</h1>
  24.  
  25. <h2>&raquo; Package Directory Structure</h2>
  26.  
  27. <p>Published: 14th November 2003</p>
  28.  
  29. The goal is to unify the directory naming inside CVS and after installation.
  30.  
  31. <p>Let's assume we have a package &quot;The_Package_Name&quot; that contains one or more
  32. sub-classes (eg. The_Package_Name_Module), with some documentation (perhaps
  33. a README, copies of RFCs, etc.), a battery of test scripts (unit tests,
  34. regression tests, etc.), and it uses some data files (localization strings,
  35. etc.), the dir tree would look like:</p>
  36.  
  37. <pre>
  38.         The_Package_Name
  39.         |-- Name (contains Module.php)
  40.         |-- data
  41.         |-- docs
  42.         |   `-- examples
  43.         |-- misc
  44.         |-- scripts
  45.         `-- tests
  46. </pre>
  47.  
  48. <p>&quot;Name&quot; refers to the last part of the &quot;The_Package_Name&quot;, 
  49. all subclasses of the main class, should be put in there or subdirectories of it.
  50. You can refer to http://cvs.php.net/cvs.php/pear/Cache_Lite/ - the directory
  51. &quot;Lite&quot; as an example (this basically documents what we currently
  52. do anyway). These types of dirs are optional.</p>
  53.  
  54. <p>The &quot;data&quot; and &quot;misc&quot; dirs should be optional, because
  55. it will not make sense to have them for every single package in PEAR.</p>
  56.  
  57. <p>The directories that are required are &quot;docs/examples&quot; and 
  58. &quot;tests&quot;. A package may have no extra documentation, but it should
  59. have at least one example. There must also be some basics test to be able to 
  60. verify that the package is working. The preferred type of testing script 
  61. system to use is PHPUnit or .phpt. But for now we would be content with 
  62. any sort of test script.</p>
  63.  
  64. <p>File in scripts will be installed into a directory available in $PATH,
  65. such as /usr/local/bin.</p>
  66.  
  67. <p>Anything that does not fit any of the above categories is placed into the
  68. &quot;misc&quot; dir.</p>
  69.  
  70. <p>Maintainers are expected to modify their existing packages to match
  71. this new standard.</p>
  72.  
  73. <?php
  74.  
  75. echo make_link('/group/''Back');
  76.  
  77. response_footer();

Documentation generated on Mon, 11 Mar 2019 16:01:20 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.