]> granicus.if.org Git - php/commitdiff
* package.dtd: version 1.0b7
authorStig Bakken <ssb@php.net>
Sun, 28 Apr 2002 07:52:00 +0000 (07:52 +0000)
committerStig Bakken <ssb@php.net>
Sun, 28 Apr 2002 07:52:00 +0000 (07:52 +0000)
  - added <provides> element
  - added <script> element

pear/PEAR/Common.php
pear/package.dtd

index 379745e8dc064993159837eea9d0bd7bfdcd2173..81817319581d7c732933831f099bfda378efb02b 100644 (file)
@@ -68,6 +68,18 @@ $GLOBALS['_PEAR_Common_file_roles'] = array('php','ext','test','doc','data','ext
  */
 $GLOBALS['_PEAR_Common_replacement_types'] = array('php-const', 'pear-config');
 
+/**
+ * Valid "provide" types
+ * @var array
+ */
+$GLOBALS['_PEAR_Common_provide_types'] = array('ext', 'prog', 'class', 'function', 'feature', 'api');
+
+/**
+ * Valid "provide" types
+ * @var array
+ */
+$GLOBALS['_PEAR_Common_script_phases'] = array('pre-install', 'post-install', 'pre-uninstall', 'post-uninstall', 'pre-build', 'post-build', 'pre-configure', 'post-configure', 'pre-setup', 'post-setup');
+
 // }}}
 
 /**
@@ -1226,6 +1238,34 @@ class PEAR_Common extends PEAR
         return $GLOBALS['_PEAR_Common_replacement_types'];
     }
 
+    // }}}
+    // {{{ getReplacementTypes()
+
+    /**
+     * Get the implemented file replacement types in
+     *
+     * @return array
+     * @static
+     */
+    function getProvideTypes()
+    {
+        return $GLOBALS['_PEAR_Common_provide_types'];
+    }
+
+    // }}}
+    // {{{ getReplacementTypes()
+
+    /**
+     * Get the implemented file replacement types in
+     *
+     * @return array
+     * @static
+     */
+    function getScriptPhases()
+    {
+        return $GLOBALS['_PEAR_Common_script_phases'];
+    }
+
     // }}}
 
     // {{{ downloadHttp()
index f80e766c13ecae6b420500d8802f837f4fa60edc..1b5887f0b2b69196f0915dc2f1c3e6e719681f84 100644 (file)
@@ -1,10 +1,10 @@
 <!--
-     $Id: package.dtd,v 1.22 2002-04-09 08:10:08 ssb Exp $
+     $Id: package.dtd,v 1.23 2002-04-28 07:52:00 ssb Exp $
 
-     This is the PEAR package description, version 1.0b6.
+     This is the PEAR package description, version 1.0b7.
      It should be used with the informal public identifier:
 
-         "-//PHP Group//DTD PEAR Package 1.0b6//EN//XML"
+         "-//PHP Group//DTD PEAR Package 1.0b7//EN//XML"
 
      Copyright (c) 1997-2002 The PHP Group             
 
@@ -43,7 +43,7 @@
 
 <!ELEMENT changelog (release)+>
 
-<!ELEMENT release (version|license|state|date|notes|filelist|deps)+>
+<!ELEMENT release (version|license|state|date|notes|filelist|deps|provides)+>
 
 <!ELEMENT version (#PCDATA)>
 
        type    (pkg|ext|php|prog|ldlib|rtlib|os|websrv|sapi) #REQUIRED
        rel     (has|eq|lt|le|gt|ge)                          'has'
        version CDATA                                         #IMPLIED>
+
+<!ELEMENT provides (#PCDATA)>
+<!ATTLIST provides
+       type    (ext|prog|class|function|feature|api)  #REQUIRED
+        name    CDATA                                  #REQUIRED>
+
+<!ELEMENT script (#PCDATA)>
+<!ATTLIST script
+        phase   (pre-install  |post-install  |
+                 pre-uninstall|post-uninstall|
+                 pre-build    |post-build    |
+                 pre-configure|post-configure|
+                 pre-setup    |post-setup    )         #REQUIRED>