logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

cvs: pear-core /PEAR/PackageFile v1.php v2.php: msg#00140

Subject: cvs: pear-core /PEAR/PackageFile v1.php v2.php
cellog          Sun Apr 24 00:50:03 2005 EDT

  Modified files:              
    /pear-core/PEAR/PackageFile v1.php v2.php 
  Log:
  add setRawPackage()/setRawChannel()/setDeps() for REST support
  
http://cvs.php.net/diff.php/pear-core/PEAR/PackageFile/v1.php?r1=1.50&r2=1.51&ty=u
Index: pear-core/PEAR/PackageFile/v1.php
diff -u pear-core/PEAR/PackageFile/v1.php:1.50 
pear-core/PEAR/PackageFile/v1.php:1.51
--- pear-core/PEAR/PackageFile/v1.php:1.50      Sun Mar 20 21:07:47 2005
+++ pear-core/PEAR/PackageFile/v1.php   Sun Apr 24 00:50:03 2005
@@ -15,7 +15,7 @@
  * @author     Greg Beaver <cellog@xxxxxxx>
  * @copyright  1997-2005 The PHP Group
  * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
- * @version    CVS: $Id: v1.php,v 1.50 2005/03/21 02:07:47 cellog Exp $
+ * @version    CVS: $Id: v1.php,v 1.51 2005/04/24 04:50:03 cellog Exp $
  * @link       http://pear.php.net/package/PEAR
  * @since      File available since Release 1.4.0a1
  */
@@ -310,12 +310,25 @@
     var $_archiveFile;
 
     /**
-     * @var boolean
+     * @var int
      * @access private
      */
     var $_isValid = 0;
 
     /**
+     * Determines whether this packagefile was initialized only with partial 
package info
+     *
+     * If this package file was constructed via parsing REST, it will only 
contain
+     *
+     * - package name
+     * - channel name
+     * - dependencies 
+     * @var boolean
+     * @access private
+     */
+    var $_incomplete = true;
+
+    /**
      * @param bool determines whether to return a PEAR_Error object, or use 
the PEAR_ErrorStack
      * @param string Name of Error Stack class to use.
      */
@@ -437,9 +450,15 @@
 
     function fromArray($pinfo)
     {
+        $this->_incomplete = false;
         $this->_packageInfo = $pinfo;
     }
 
+    function isIncomplete()
+    {
+        return $this->_incomplete;
+    }
+
     function getChannel()
     {
         return 'pear.php.net';
@@ -492,6 +511,14 @@
         return false;
     }
 
+    /**
+     * WARNING - don't use this unless you know what you are doing
+     */
+    function setRawPackage($package)
+    {
+        $this->_packageInfo['package'] = $package;
+    }
+
     function setPackage($package)
     {
         $this->_packageInfo['package'] = $package;
@@ -709,6 +736,14 @@
                   'optional' => $optional);
     }
 
+    /**
+     * WARNING - do not use this function directly unless you know what you're 
doing
+     */
+    function setDeps($deps)
+    {
+        $this->_packageInfo['release_deps'] = $deps;
+    }
+
     function hasDeps()
     {
         return isset($this->_packageInfo['release_deps']) &&
http://cvs.php.net/diff.php/pear-core/PEAR/PackageFile/v2.php?r1=1.93&r2=1.94&ty=u
Index: pear-core/PEAR/PackageFile/v2.php
diff -u pear-core/PEAR/PackageFile/v2.php:1.93 
pear-core/PEAR/PackageFile/v2.php:1.94
--- pear-core/PEAR/PackageFile/v2.php:1.93      Mon Mar 28 12:50:51 2005
+++ pear-core/PEAR/PackageFile/v2.php   Sun Apr 24 00:50:03 2005
@@ -15,7 +15,7 @@
  * @author     Greg Beaver <cellog@xxxxxxx>
  * @copyright  1997-2005 The PHP Group
  * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
- * @version    CVS: $Id: v2.php,v 1.93 2005/03/28 17:50:51 cellog Exp $
+ * @version    CVS: $Id: v2.php,v 1.94 2005/04/24 04:50:03 cellog Exp $
  * @link       http://pear.php.net/package/PEAR
  * @since      File available since Release 1.4.0a1
  */
@@ -109,6 +109,19 @@
     var $_tasksNs;
 
     /**
+     * Determines whether this packagefile was initialized only with partial 
package info
+     *
+     * If this package file was constructed via parsing REST, it will only 
contain
+     *
+     * - package name
+     * - channel name
+     * - dependencies 
+     * @var boolean
+     * @access private
+     */
+    var $_incomplete = true;
+
+    /**
      * The constructor merely sets up the private error stack
      */
     function PEAR_PackageFile_v2()
@@ -310,6 +323,22 @@
             'package.xml 1.0 file "%file%" is not present in <contents>');
     }
 
+    /**
+     * WARNING - do not use this function unless you know what you're doing
+     */
+    function setRawPackage($package)
+    {
+        $this->_packageInfo['name'] = $package;
+    }
+
+    /**
+     * WARNING - do not use this function unless you know what you're doing
+     */
+    function setRawChannel($channel)
+    {
+        $this->_packageInfo['channel'] = $channel;
+    }
+
     function setRequestedGroup($group)
     {
         $this->_requestedGroup = $group;
@@ -536,6 +565,14 @@
         $this->_logger = &$logger;
     }
 
+    /**
+     * WARNING - do not use this function directly unless you know what you're 
doing
+     */
+    function setDeps($deps)
+    {
+        $this->_packageInfo['dependencies'] = $deps;
+    }
+
     function setPackagefile($file, $archive = false)
     {
         $this->_packageFile = $file;
@@ -574,9 +611,15 @@
     {
         unset($pinfo['old']);
         unset($pinfo['xsdversion']);
+        $this->_incomplete = false;
         $this->_packageInfo = $pinfo;
     }
 
+    function isIncomplete()
+    {
+        return $this->_incomplete;
+    }
+
     /**
      * @return array
      */



<Prev in Thread] Current Thread [Next in Thread>