home *** CD-ROM | disk | FTP | other *** search
/ PC World 2005 April / PCWorld_2005-04_cd.bin / akce / web / phptriad / phptriad2-2-1.exe / php / pear / PEAR / Uploader.php < prev    next >
PHP Script  |  2001-05-27  |  2KB  |  62 lines

  1. <?php
  2. //
  3. // +----------------------------------------------------------------------+
  4. // | PHP version 4.0                                                      |
  5. // +----------------------------------------------------------------------+
  6. // | Copyright (c) 1997-2001 The PHP 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: Stig Bakken <ssb@fast.no>                                   |
  17. // |                                                                      |
  18. // +----------------------------------------------------------------------+
  19. //
  20.  
  21. require_once "PEAR/Common.php";
  22.  
  23. /**
  24.  * Administration class used to install PEAR packages and maintain the
  25.  * installed package database.
  26.  *
  27.  * @since PHP 4.0.2
  28.  * @author Stig Bakken <ssb@fast.no>
  29.  */
  30. class PEAR_Uploader extends PEAR_Common
  31. {
  32.     // {{{ properties
  33.  
  34.     var $_tempfiles = array();
  35.  
  36.     // }}}
  37.  
  38.     // {{{ constructor
  39.  
  40.     function PEAR_Uploader()
  41.     {
  42.         $this->PEAR_Common();
  43.     }
  44.  
  45.     // }}}
  46.  
  47.     function upload($pkgfile, $infofile = null)
  48.     {
  49.         if ($infofile === null) {
  50.             $info = $this->infoFromTarBall($pkgfile);
  51.         } else {
  52.             $info = $this->infoFromDescriptionFile($infofile);
  53.         }
  54.         if (PEAR::isError($info)) {
  55.             return $info;
  56.         }
  57.         
  58.     }
  59. }
  60.  
  61. ?>
  62.